Hi! Welcome to the first ever edition of ‘This Month in TiKV’, covering July 2019. As the name suggests, this is a monthly newsletter covering interesting things happening in the world of TiKV, an open-source, distributed key-value store.
We’re just getting started with the newsletter, and you should expect it to evolve as we go along. We hope to cover news and events of interest to TiKV contributors and users, significant PRs and issues in the TiKV repo, and generally keep you informed of what is going on. Since this is the first issue we’ll cover a few bits of news from before July.
You’ll find the newsletter on the TiKV blog from the first week of each month.
Let us know what you think!
Jepsen tested TiDB and TiKV in a detailed analysis. This focused on transaction guarantees and failure testing.
Some blog posts and articles related to TiKV:
- The TiKV team launched a training course covering Rust and distributed systems (English).
- Nick Cameron wrote about migrating the Rust TiKV client from futures 0.1 to 0.3 (English).
- Ana Hobden wrote on the PingCAP blog about benchmarking distributed databases (English).
- Source code reading posts on an analysis of control flow through service layers, Snapshot send and receive, and Storage and transaction control (Chinese).
There’s lots going on in the TiKV ecosystem. Here we’ll try to highlight some of the interesting projects.
There’s ongoing work to measure and improve TiKV’s performance in all areas. We’ve been making heavy use of tools like Intel Vtune and flame graph to find the slowest parts of TiKV. We hope to report more on specifics soon.
Titan is a storage engine plugin which improves on RocksDB. It is part of TiKV already and you can try it out by following these instructions. We’re working to improve its performance and stability. You can read more in this blog post.
We are currently migrating our documentation from the TiKV’s wiki to the official website. We’ll also be refactoring much of our documentation over the coming months. If you feel something is lacking please let us know!
Replica read allows a database to read from a Raft follower, not just the leader. This greatly improves read performance when the client is close to a follower, but far from the leader (e.g., in different data centres). This feature is implemented in TiKV and we are working on adding support to TiDB.
We’re experimenting with different implementations of Protocol Buffers (which underpin all our RPC communication). We’ve added support for Prost to our supporting libraries, and are working on adding support to TiKV.
Testing and stability
We’re working on making testing more reliable, adding long-running tests to our CI, and monitoring performance.
Adding RPN functions
TiKV supports executing SQL functions on the database using its coprocessor. We’ve been working to support RPN (reverse polish notation) functions, which are an optimisation technique for coprocessor. In the past month we’ve added support for
date_format. There is more information about implementing coprocessor functions.
We’re working on implementing a client library for TiKV in Rust. This will support very high performance TiKV clients.
Waiting for code to compile is a pain, and TiKV can take quite a while to compile (especially in release mode). We’ve been working hard to improve that, for example in #4996.
RFCs (Request For Comments) are how the TiKV team engages with the wider community to do open design of new features and major changes.
Currently, the RFCs for a Rust client and a command line client are in the final stages of discussion. There is also an interesting RFC to add a dedicated thread to TiKV for reading from the local raftstore, which is almost ready to be accepted.
In PR 5155, we created a new crate inside the tikv repository called
tidb_query, it contains large parts of the coprocessor which have been moved from
src/coprocessor/dag. The PR also renames the
cop_xxx crates to
tidb_query_xxx. Due to increased parallelism, this improves compile times by up to 25%.
In PR 5036 the tikv importer was moved out of the tikv repository and into its own repository.
When running TiKV on older CPUs, a
sigill could be triggered originating in Titan. This has been fixed on master and will be fixed in the next point release. In the meantime, you can resolve this issue by building from source. Issue 4999.
We’d like to welcome the following new contributors to TiKV and thank them for their work!
If you’d like to get involved, we’d love to help you get started. You might be interested in tackling one of these issues. If you don’t know how to begin, please leave a comment and somebody will help you out. We’re also very keen for people to contribute documentation, tests, optimizations, benchmarks, refactoring, or other useful things.
This Week in TiDB
For more rapid and detailed information about TiKV progress, PingCAP publishes weekly updates about TiDB and TiKV. The following cover July,