TiDB is not based on RocksDB, it runs on top of TiKV which is a custom distributed key/value store written in rust.
https://github.com/pingcap/rust-rocksdb
https://github.com/tikv/tikv/blob/master/src/storage/kv/rock...
Because of the write amplification issue of RocksDB, we build a RocksDB plugin, TiTan. Here is its design and implementation detail: https://pingcap.com/blog/titan-storage-engine-design-and-imp...