RocksDB 5.9.2 已发布，该版本的更新包括 Public API 的修改、新增特性和修复 Bug。
RocksDB 是一个来自 Facebook 的可嵌入的支持持久化的 key-value 存储系统，也可作为 C/S 模式下的存储数据库。RocksDB 基于 LevelDB 构建。
Public API 变更
BackupableDBOptions::max_valid_backups_to_open == 0now means no backups will be opened during BackupEngine initialization. Previously this condition disabled limiting backups opened.
DBOptions::preserve_deletesis a new option that allows one to specify that DB should not drop tombstones for regular deletes if they have sequence number larger than what was set by the new API call
DB::SetPreserveDeletesSequenceNumber(SequenceNumber seqnum). Disabled by default.
- API call
DB::SetPreserveDeletesSequenceNumber(SequenceNumber seqnum)was added, users who wish to preserve deletes are expected to periodically call this function to advance the cutoff seqnum (all deletes made before this seqnum can be dropped by DB). It’s user responsibility to figure out how to advance the seqnum in the way so the tombstones are kept for the desired period of time, yet are eventually processed in time and don’t eat up too much space.
DBOptions::writable_file_max_buffer_sizecan now be changed dynamically.
DBOptions::wal_bytes_per_synccan now be changed dynamically,
DBOptions::wal_bytes_per_syncwill flush all memtables and switch to a new WAL file.
- Support dynamic adjustment of rate limit according to demand for background I/O. It can be enabled by passing
NewGenericRateLimiter(). The value passed as
rate_bytes_per_secwill still be respected as an upper-bound.
- Support dynamically changing
- Add a new db property “rocksdb.estimate-oldest-key-time” to return oldest data timestamp. The property is available only for FIFO compaction with compaction_options_fifo.allow_compaction = false.
- Fix a potential data inconsistency issue during point-in-time recovery.
DB:Open()will abort if column family inconsistency is found during PIT recovery.
- Fix possible metadata corruption in databases using
- Fix IOError on WAL write doesn’t propagate to write group follower
- Fix calculating filter partition target size
- Fix possible corruption to LSM structure when
DeleteFilesInRange()deletes a subset of files spanned by a