Releases: facebook/rocksdb
Releases · facebook/rocksdb
RocksDB 3.11.2
Fixes
- Adjust the way we compensate for tombstones when choosing compactions. Previous heuristics led to pathological behavior in some cases.
- Don't let two L0->L1 compactions run in parallel (only affected through experimental feature SuggestCompactRange)
RocksDB 3.11.1
Just a single change to fix the Java linking (github issue #606)
RocksDB 3.11
New Features
- Added a new API Cache::SetCapacity(size_t capacity) to dynamically change the maximum configured capacity of the cache. If the new capacity is less than the existing cache usage, the implementation will try to lower the usage by evicting the necessary number of elements following a strict LRU policy.
- Added an experimental API for handling flashcache devices (blacklists background threads from caching their reads) -- NewFlashcacheAwareEnv
- If universal compaction is used and options.num_levels > 1, files are compacted in upper levels with smaller files based on options.target_file_size_base. The limitation of file size when using universal compaction is greatly mitigated by using more levels. You can set num_levels = 1 to make universal compaction behave as before. If you set num_levels > 1 and want to roll back to a previous version, you need to compact all files to a big file in level 0 (by setting target_file_size_base to be large and CompactRange(<cf_handle>, nullptr, nullptr, true, 0) and reopen the DB with the same version to rewrite the manifest, and then you can open it using previous releases.
- More information about rocksdb background threads are available in Env::GetThreadList(), including the number of bytes read / written by a compaction job, mem-table size and current number of bytes written by a flush job and many more. Check include/rocksdb/thread_status.h for more detail.
Public API changes
- TablePropertiesCollector::AddUserKey() is added to replace TablePropertiesCollector::Add(). AddUserKey() exposes key type, sequence number and file size up to now to users.
- DBOptions::bytes_per_sync used to apply to both WAL and table files. As of 3.11 it applies only to table files. If you want to use this option to sync WAL in the background, please use wal_bytes_per_sync
RocksDB 3.10.2
Bug fixes since 3.10.1:
- Make sure RocksDB is compiled with fallocate support
- Fix possible hang in DB::Write()
- Fix a possibility of SIGSEGV in CompactRange()
RocksDB 3.10
3.10.0 (4/3/2015)
New Features
- GetThreadStatus() is now able to report detailed thread status, including:
- Thread Operation including flush and compaction.
- The stage of the current thread operation.
- The elapsed time in micros since the current thread operation started.
More information can be found in include/rocksdb/thread_status.h. In addition, when running db_bench with --thread_status_per_interval, db_bench will also report thread status periodically.
- Changed the LRU caching algorithm so that referenced blocks (by iterators) are never evicted. This change made parameter removeScanCountLimit obsolete. Because of that NewLRUCache doesn't take three arguments anymore. table_cache_remove_scan_limit option is also removed
- By default we now optimize the compilation for the compilation platform (using -march=native). If you want to build portable binary, use 'PORTABLE=1' before the make command.
- We now allow level-compaction to place files in different paths by
specifying them in db_paths along with the target_size.
Lower numbered levels will be placed earlier in the db_paths and higher
numbered levels will be placed later in the db_paths vector. - Potentially big performance improvements if you're using RocksDB with lots of column families (100-1000)
- Added BlockBasedTableOptions.format_version option, which allows user to specify which version of block based table he wants. As a general guidline, newer versions have more features, but might not be readable by older versions of RocksDB.
- Added new block based table format (version 2), which you can enable by setting BlockBasedTableOptions.format_version = 2. This format changes how we encode size information in compressed blocks and should help with memory allocations if you're using Zlib or BZip2 compressions.
- MemEnv (env that stores data in memory) is now available in default library build. You can create it by calling NewMemEnv().
- Add SliceTransform.SameResultWhenAppended() to help users determine it is safe to apply prefix bloom/hash.
- Block based table now makes use of prefix bloom filter if it is a full fulter.
- Block based table remembers whether a whole key or prefix based bloom filter is supported in SST files. Do a sanity check when reading the file with users' configuration.
- Fixed a bug in ReadOnlyBackupEngine that deleted corrupted backups in some cases, even though the engine was ReadOnly
- options.level_compaction_dynamic_level_bytes, an experimental feature to allow RocksDB to pick dynamic base of bytes for levels. With this feature turned on, we will automatically adjust max bytes for each level. The goal of this feature is to have lower bound on size amplification. For more details, see comments in options.h.
- Added an abstract base class WriteBatchBase for write batches
- Fixed a bug where we start deleting files of a dropped column families even if there are still live references to it
Public API changes
- Deprecated skip_log_error_on_recovery and table_cache_remove_scan_count_limit options.
- Logger method logv with log level parameter is now virtual
RocksJava
- Added compression per level API.
- MemEnv is now available in RocksJava via RocksMemEnv class.
- lz4 compression is now included in rocksjava static library when running
make rocksdbjavastatic. - Overflowing a size_t when setting rocksdb options now throws an IllegalArgumentException, which removes the necessity for a developer to catch these Exceptions explicitly.
RocksDB 3.9.1
Public API changes
- New API to create a checkpoint added. Given a directory name, creates a new
database which is an image of the existing database.
*New API LinkFile added to Env. If you implement your own Env class, an
implementation of the API LinkFile will have to be provided. - MemTableRep takes MemTableAllocator instead of Arena
Improvements
- RocksDBLite library now becomes smaller and will be compiled with -fno-exceptions flag.
RocksDB 3.8
Public API changes
- BackupEngine::NewBackupEngine() was deprecated; please use BackupEngine::Open() from now on.
- BackupableDB/RestoreBackupableDB have new GarbageCollect() methods, which will clean up files from corrupt and obsolete backups.
- BackupableDB/RestoreBackupableDB have new GetCorruptedBackups() methods which list corrupt backups.
Cleanup
- Bunch of code cleanup, some extra warnings turned on (-Wshadow, -Wshorten-64-to-32, -Wnon-virtual-dtor)
New features
- CompactFiles and EventListener, although they are still in experimental state
- Full ColumnFamily support in RocksJava.
RocksDB 3.7
- Introduce SetOptions() API to allow adjusting a subset of options dynamically online
- Introduce 4 new convenient functions for converting Options from string: GetColumnFamilyOptionsFromMap(), GetColumnFamilyOptionsFromString(), GetDBOptionsFromMap(), GetDBOptionsFromString()
- Remove WriteBatchWithIndex.Delete() overloads using SliceParts
- When opening a DB, if options.max_background_compactions is larger than the existing low pri pool of options.env, it will enlarge it. Similarly, options.max_background_flushes is larger than the existing high pri pool of options.env, it will enlarge it.
RocksDB 3.6.2
Bug Fixes
- Fix a corner case that causes MANIFEST corruption when RocksDB cannot open new files during the compaction but before the compaction completes RocksDB becomes able to open new files once again.
New Features
- Allow dynamic disable / enable RocksDB auto-compaction.
Internal Improvements
- Use fallocate(FALLOC_FL_PUNCH_HOLE) to release unused blocks at the end of file.
RocksDB 3.6.1
New features
- Support more column families without performance bottlenecks
- Provide new way of passing options to RocksDB
- Make some options dynamically changeable
- Bunch of new Java bindings APIs
Disk format changes
- If you're using RocksDB on ARM platforms and you're using default bloom filter, there is a disk format change you need to be aware of. There are three steps you need to do when you convert to new release: 1. turn off filter policy, 2. compact the whole database, 3. turn on filter policy
Behavior changes
- We have refactored our system of stalling writes. Any stall-related statistics' meanings are changed. Instead of per-write stall counts, we now count stalls per-epoch, where epochs are periods between flushes and compactions. You'll find more information in our Tuning Perf Guide.
- When disableDataSync=true, we no longer sync the MANIFEST file.
- Add identity_as_first_hash property to CuckooTable. SST file needs to be rebuilt to be opened by reader properly.
Public API changes
- Change target_file_size_base type to uint64_t from int.
- Remove allow_thread_local. This feature was proved to be stable, so we are turning it always-on.