Repository navigation
What's Changed
This release moves the bundled RocksDB from 11.12.0 to 11.14.0, which also covers 11.13.x. Read these before upgrading:
EnvPriority::Useris now 4. RocksDB 11.14 inserted aREADthread pool beforeUSER.CompactionServiceJobInfo::prioritykeeps decodingUSERcorrectly and returnsNoneforREAD. Code that castsEnvPriority::Userto an integer sees 4 instead of 3. (@zaidoon1)- With auto-resume off, IO errors in flushes and compactions are hard errors. With
set_max_bgerror_resume_countat 0 or below, a retryable or file-scoped IO error during a flush or compaction now stops writes untilresumeis called. - Four UDI methods are deprecated, as upstream deprecated them:
set_use_udi_as_primary_index,set_fail_if_no_udi_on_openand their getters. Useset_index_mode. Builds that deny warnings will notice. (@zaidoon1) coroutinesusers need to rerunscripts/build_folly.sh, since RocksDB moved its folly pin. (@zaidoon1)
Features
- Batched pinned reads on
TransactionDB:batched_multi_get_pinnedandbatched_multi_get_pinned_batch, with_opt,_cfand_cf_optvariants, as onDB. UnderWritePreparedandWriteUnprepared, RocksDB reads key by key, so set a snapshot to read every key at one point in time. (@zaidoon1) DBRawIterator::prepare_valueloads a value thatReadOptions::set_allow_unprepared_valuedeferred, such as one in a blob file. (@kmorkos)- Options added in RocksDB 11.13 and 11.14:
BlockBasedOptions::set_index_modeandReadOptions::set_read_index(experimental),set_reject_too_old_fileon the ingest and import options,CompactOptions::set_skip_missing_blob_files,Options::set_use_separate_remote_compaction_pool,Options::set_track_options_file_number_in_manifest(experimental) andTraceOptions::set_include_read_write_options. (@zaidoon1)
Fixes
- Batched reads on
DBno longer leak when RocksDB throws, with the bundled RocksDB. They went through upstream's C function, which doesn't catch, so an exception leaked its arrays and the block cache entries their values pinned. (@zaidoon1) - Windows builds against a system RocksDB compile the crate's C++ shim with exception unwinding, and stop with a clear error if
CXXFLAGS,CXX,CLor_CL_brings back thecof/EHsc. (@zaidoon1)
Upstream fixes and behavior changes
- Data loss: fixed for WALs reused under
set_recycle_log_file_num, and for two range-tombstone conversion bugs underset_min_tombstones_for_range_conversion. multi_getcould report existing keys outside the prefix extractor's domain as missing with some partitioned-filter settings.getwas not affected.create_cfnow validates table options the way opening a DB does.- Async reads are charged to the rate limiter like synchronous ones.
- Ingested files keep the creation times recorded in them, so old data can come due for periodic compaction or TTL soon after ingestion.
- Snapshots on a primary no longer take the DB mutex in the common case, and perf context counting costs about 60% less.
Performance
- Batched pinned reads on
DBkeep up to 32 keys' slices and results on the stack.batched_multi_get_pinnedtakes 11% less time at 1 key and 8% less at 4 keys. (@zaidoon1) - Probers built without caller options share one
ReadOptions, so creating and dropping one takes 10% fewer instructions. (@zaidoon1)
rust-librocksdb-sys moves to 0.50.0+11.14.0.
Full notes are in CHANGELOG.md.
Full Changelog: v0.54.1...v0.55.0