Can multiple RocksDB instances share and read from the same key-range?

639 views Asked by At

Past answers on Stack Overflow suggest that the single threaded nature of RocksDB means the answer is no, but official FB documentation has pages like this http://rocksdb.org/blog/2021/05/27/rocksdb-secondary-cache.html where multiple instances seem to be sharing a cache.

1)Are these instances using the same key range?

  1. If so, how are updates being communicated from one DB instance to another? As far as I know RocksDB doesn't have any interDB communication?
1

There are 1 answers

0
Jay Zhuang On BEST ANSWER
  1. DB instances do not share key range.

Just FYI. one process can have multiple RocksDB instances, each instance can have multiple column-families. They do not share user-data. Internally, column-families in one instance share WAL (write ahead log), manifest (tracking db information), option file. DB instances in one process share the same Env, threadpool, timer, cache.