RocksDB v6.7.0 Release Notes

Release Date: 2020-01-21 // over 4 years ago
  • Public API Change

    • Added a rocksdb::FileSystem class in include/rocksdb/file_system.h to encapsulate file creation/read/write operations, and an option DBOptions::file_system to allow a user to pass in an instance of rocksdb::FileSystem. If its a non-null value, this will take precendence over DBOptions::env for file operations. A new API rocksdb::FileSystem::Default() returns a platform default object. The DBOptions::env option and Env::Default() API will continue to be used for threading and other OS related functions, and where DBOptions::file_system is not specified, for file operations. For storage developers who are accustomed to rocksdb::Env, the interface in rocksdb::FileSystem is new and will probably undergo some changes as more storage systems are ported to it from rocksdb::Env. As of now, no env other than Posix has been ported to the new interface.
    • A new rocksdb::NewSstFileManager() API that allows the caller to pass in separate Env and FileSystem objects.
    • ๐Ÿ”„ Changed Java API for RocksDB.keyMayExist functions to use Holder instead of StringBuilder, so that retrieved values need not decode to Strings.
    • ๐Ÿ”ง A new OptimisticTransactionDBOptions Option that allows users to configure occ validation policy. The default policy changes from kValidateSerial to kValidateParallel to reduce mutex contention.

    ๐Ÿ› Bug Fixes

    • ๐Ÿ›  Fix a bug that can cause unnecessary bg thread to be scheduled(#6104).
    • ๐Ÿ›  Fix crash caused by concurrent CF iterations and drops(#6147).
    • Fix a race condition for cfd->log_number_ between manifest switch and memtable switch (PR 6249) when number of column families is greater than 1.
    • ๐Ÿ›  Fix a bug on fractional cascading index when multiple files at the same level contain the same smallest user key, and those user keys are for merge operands. In this case, Get() the exact key may miss some merge operands.
    • Delcare kHashSearch index type feature-incompatible with index_block_restart_interval larger than 1.
    • Fixed an issue where the thread pools were not resized upon setting max_background_jobs dynamically through the SetDBOptions interface.
    • ๐Ÿ›  Fix a bug that can cause write threads to hang when a slowdown/stall happens and there is a mix of writers with WriteOptions::no_slowdown set/unset.
    • ๐Ÿ›  Fixed an issue where an incorrect "number of input records" value was used to compute the "records dropped" statistics for compactions.
    • Fix a regression bug that causes segfault when hash is used, max_open_files != -1 and total order seek is used and switched back.

    ๐Ÿ†• New Features

    • It is now possible to enable periodic compactions for the base DB when using BlobDB.
    • BlobDB now garbage collects non-TTL blobs when enable_garbage_collection is set to true in BlobDBOptions. Garbage collection is performed during compaction: any valid blobs located in the oldest N files (where N is the number of non-TTL blob files multiplied by the value of BlobDBOptions::garbage_collection_cutoff) encountered during compaction get relocated to new blob files, and old blob files are dropped once they are no longer needed. Note: we recommend enabling periodic compactions for the base DB when using this feature to deal with the case when some old blob files are kept alive by SSTs that otherwise do not get picked for compaction.
    • ๐Ÿ‘ db_bench now supports the garbage_collection_cutoff option for BlobDB.
    • Introduce ReadOptions.auto_prefix_mode. When set to true, iterator will return the same result as total order seek, but may choose to use prefix seek internally based on seek key and iterator upper bound.
    • ๐Ÿ‘‰ MultiGet() can use IO Uring to parallelize read from the same SST file. This featuer is by default disabled. It can be enabled with environment variable ROCKSDB_USE_IO_URING.