New Features
- Added
FullExternalTableFactoryand related full-mode external table APIs that preserve RocksDB internal keys, enabling external tables to support nonzero sequence numbers, point and single deletions, merge operands, blob indexes, wide-column entities, snapshots, live DB writes, and multi-level compactions.
Public API Changes
- Added experimental coroutine capability interfaces for basic and full
ExternalTableReaderimplementations. Coroutine-capable external readers can initiate file reads throughFSRandomAccessFile::SubmitReadAsync(). ExternalTableFactory::NewTableReader()now receives an already-openedFSRandomAccessFileand its file size instead of requiring implementations to reopenfile_path. The supplied file preserves RocksDB's direct-I/O alignment handling, rate limiting, read statistics and listener notifications, prefetching, and synchronous, asynchronous, and batched reads.- Added
PutRangeDeletionBlock(),GetRangeDeletionBlock(), andIsDeleteRangeSupported()to the external table interfaces so formats can opt in to range deletions using RocksDB's raw range-deletion metadata block. - Opaque
PreparedFileInfometadata can now be serialized to a checksummed representation withSerializePreparedFileInfo()and restored withDeserializePreparedFileInfo()for reuse across processes. - Removed the deprecated
IngestExternalFileOptions::write_global_seqnooption and its C, Java, andldbAPIs,TableProperties::external_sst_file_global_seqno_offset, and thefile_offsetoutput fromExternalTableReader::GetPropertiesBlock(). Existing external SST files whose global sequence number was rewritten without updating the properties-block checksum remain readable. TablePropertiesNameshas no apparent use in the public API so has been deprecated there.TableProperties::creation_timeis renamed tooldest_ancestor_time, which better describes its meaning, along withTablePropertiesNames::kCreationTimetokOldestAncestorTime. The misspelledSstFileMetaData::oldest_ancester_timeis renamed tooldest_ancestor_time. The old names remain available as deprecated aliases and will be removed in a future release.- Added
WriteBufferFlushPolicyandWriteBufferManagerpolicy selection for flushing the oldest or largest column family, including configurable batched flushing of the largest column families across DBs sharing a manager, with C and Java bindings.
Behavior Changes
- When
ExternalTableBuilderBase::PutPropertiesBlock()returnsNotSupported, RocksDB now overridesnum_entries,raw_key_size, andraw_value_sizefromExternalTableBuilderBase::GetTableProperties()with the logical totals tracked by the external-table adapter. Format-specific properties such asdata_sizeremain unchanged. - The
FSWritableFilepassed toExternalTableFactory::NewTableBuilder()now reports logical file size including RocksDB-buffered data and exposes the underlying file's direct-I/O mode and required buffer alignment. Iterator::Refresh()now returnsNotSupportedon iterators from a secondary DB'sDB::NewIterators()only, because those iterators are pinned to one cross-column-family read view. Iterators fromDB::NewIterator()are unaffected; to advance a batch, callDB::NewIterators()again afterTryCatchUpWithPrimary().SstFileReadernow reports standard SST read statistics and file I/O listener notifications, and honors the configured read rate limiter.
Bug Fixes
- Fixed full recovery from retryable background errors to atomically advance WAL replay boundaries for all column families, preventing partial recovery of multi-column-family write batches after a failed recovery flush.
- Fixed RocksDB builds on big-endian architectures such as s390x by disabling the optional persistent fault-injection log, whose binary format is little-endian-only.
- Fixed
DB::ClipColumnFamily()deleting a non-L0 SST file whose largest key equalsbegin_key, which lost keys at the start of the kept range. - Fixed swapped
oldest_key_timeandnewest_key_timevalues in thetable_file_creationevent log entry. - Fixed
ExternalTableReader::VerifyChecksum()results not being honored by the external table adapter. - Fixed a bug in manifest handling that could lead to a hang or memory corruption in the case of LSM sanity checks being fatally violated (exceptional; see
force_consistency_checks). - Fixed
MultiGet()withReadOptions::read_tier == kBlockCacheTierreading data blocks from disk whenallow_mmap_readsis false. Keys whose data block is not in the block cache now returnStatus::Incomplete(), the same asGet(). - Fixed trace replay (
DB::NewDefaultReplayer(), db_benchreplay) failing every read record (Get, MultiGet, iterator seek) on the default column family withCorruption: Invalid Column Family IDwhen the default column family handle was not passed, which is always the case in db_bench with--num_column_families=1. - Fixed multi-threaded
Replayer::Replay()ignoring errors from executing trace records and returning OK. It now stops and returns the error, includingStatus::NotSupported()from executing a record, as single-threaded replay does. - Fixed secondary DB
NewIterators()returning iterators from different database states or blocking forTryCatchUpWithPrimary()by serving the last completed catch-up view.
Performance Improvements
- Single Get coroutine reads using non-mmap, non-direct I/O on a
kFSBuffer-capableFileSystemnow useFSRandomAccessFile::SubmitReadAsync()instead of falling back to synchronousRead(). When rate-limited, these reads acquire their full token budget before submission to preserve a single filesystem-owned buffer, which can make physical I/O burstier than reads using caller-provided buffers.