6.20.3 (2021-05-05)
Bug Fixes
- Fixed a bug where
GetLiveFiles()
output included a non-existent file called "OPTIONS-000000". Backups and checkpoints, which useGetLiveFiles()
, failed on DBs impacted by this bug. Read-write DBs were impacted when the latest OPTIONS file failed to write andfail_if_options_file_error == false
. Read-only DBs were impacted when no OPTIONS files existed.
6.20.2 (2021-04-23)
Bug Fixes
- Fixed a bug in handling file rename error in distributed/network file systems when the server succeeds but client returns error. The bug can cause CURRENT file to point to non-existing MANIFEST file, thus DB cannot be opened.
- Fixed a bug where ingested files were written with incorrect boundary key metadata. In rare cases this could have led to a level's files being wrongly ordered and queries for the boundary keys returning wrong results.
- Fixed a data race between insertion into memtables and the retrieval of the DB properties
rocksdb.cur-size-active-mem-table
,rocksdb.cur-size-all-mem-tables
, androcksdb.size-all-mem-tables
. - Fixed the false-positive alert when recovering from the WAL file. Avoid reporting "SST file is ahead of WAL" on a newly created empty column family, if the previous WAL file is corrupted.
Behavior Changes
- Due to the fix of false-postive alert of "SST file is ahead of WAL", all the CFs with no SST file (CF empty) will bypass the consistency check. We fixed a false-positive, but introduced a very rare true-negative which will be triggered in the following conditions: A CF with some delete operations in the last a few queries which will result in an empty CF (those are flushed to SST file and a compaction triggered which combines this file and all other SST files and generates an empty CF, or there is another reason to write a manifest entry for this CF after a flush that generates no SST file from an empty CF). The deletion entries are logged in a WAL and this WAL was corrupted, while the CF's log number points to the next WAL (due to the flush). Therefore, the DB can only recover to the point without these trailing deletions and cause the inconsistent DB status.
6.20.0 (2021-04-16)
Behavior Changes
ColumnFamilyOptions::sample_for_compression
now takes effect for creation of all block-based tables. Previously it only took effect for block-based tables created by flush.CompactFiles()
can no longer compact files from lower level to up level, which has the risk to corrupt DB (details: #8063). The validation is also added to all compactions.- Fixed some cases in which DB::OpenForReadOnly() could write to the filesystem. If you want a Logger with a read-only DB, you must now set DBOptions::info_log yourself, such as using CreateLoggerFromOptions().
- get_iostats_context() will never return nullptr. If thread-local support is not available, and user does not opt-out iostats context, then compilation will fail. The same applies to perf context as well.
Bug Fixes
- Use thread-safe
strerror_r()
to get error messages. - Fixed a potential hang in shutdown for a DB whose
Env
has high-pri thread pool disabled (Env::GetBackgroundThreads(Env::Priority::HIGH) == 0
) - Made BackupEngine thread-safe and added documentation comments to clarify what is safe for multiple BackupEngine objects accessing the same backup directory.
- Fixed crash (divide by zero) when compression dictionary is applied to a file containing only range tombstones.
- Fixed a backward iteration bug with partitioned filter enabled: not including the prefix of the last key of the previous filter partition in current filter partition can cause wrong iteration result.
- Fixed a bug that allowed
DBOptions::max_open_files
to be set with a non-negative integer withColumnFamilyOptions::compaction_style = kCompactionStyleFIFO
. - Fixed a bug in handling file rename error in distributed/network file systems when the server succeeds but client returns error. The bug can cause CURRENT file to point to non-existing MANIFEST file, thus DB cannot be opened.
- Fixed a data race between insertion into memtables and the retrieval of the DB properties
rocksdb.cur-size-active-mem-table
,rocksdb.cur-size-all-mem-tables
, androcksdb.size-all-mem-tables
.
Performance Improvements
- On ARM platform, use
yield
instead ofwfe
to relax cpu to gain better performance.
Public API change
- Added
TableProperties::slow_compression_estimated_data_size
andTableProperties::fast_compression_estimated_data_size
. WhenColumnFamilyOptions::sample_for_compression > 0
, they estimate whatTableProperties::data_size
would have been if the "fast" or "slow" (seeColumnFamilyOptions::sample_for_compression
API doc for definitions) compression had been used instead. - Update DB::StartIOTrace and remove Env object from the arguments as its redundant and DB already has Env object that is passed down to IOTracer::StartIOTrace
- Added
FlushReason::kWalFull
, which is reported when a memtable is flushed due to the WAL reaching its size limit; those flushes were previously reported asFlushReason::kWriteBufferManager
. Also, changed the reason for flushes triggered by the write buffer manager toFlushReason::kWriteBufferManager
; they were previously reported asFlushReason::kWriteBufferFull
. - Extend file_checksum_dump ldb command and DB::GetLiveFilesChecksumInfo API for IntegratedBlobDB and get checksum of blob files along with SST files.
New Features
- Added the ability to open BackupEngine backups as read-only DBs, using BackupInfo::name_for_open and env_for_open provided by BackupEngine::GetBackupInfo() with include_file_details=true.
- Added BackupEngine support for integrated BlobDB, with blob files shared between backups when table files are shared. Because of current limitations, blob files always use the kLegacyCrc32cAndFileSize naming scheme, and incremental backups must read and checksum all blob files in a DB, even for files that are already backed up.
- Added an optional output parameter to BackupEngine::CreateNewBackup(WithMetadata) to return the BackupID of the new backup.
- Added BackupEngine::GetBackupInfo / GetLatestBackupInfo for querying individual backups.
- Made the Ribbon filter a long-term supported feature in terms of the SST schema(compatible with version >= 6.15.0) though the API for enabling it is expected to change.