-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Compaction Trivial Move
Trivial move is type of compaction that moves the SST file directly to the next level without changing the file. It happens when there's no overlap in the next level. For example, in the following graph, SST file 2 on Level 1 doesn't have any overlap files on Level 2, so when compacting file 2 to Level 2, there's no need to re-writing any file:
SST file 1 on Level 1 cannot do trivial move, it has to be compacted with file 3 and 4 as there's overlap.
RocksDB try to do the trivial move if possible to avoid unnecessary IO. On the other hand, it may cause small files are not compacting together, or compaction filter are not run for these files. As a workaround Manual Compaction can force the compaction by setting BottommostLevelCompaction::kForce, or setting a different bottommost compression, will also force the compaction on the bottommost level.
Contents
- RocksDB Wiki
- Overview
- RocksDB FAQ
- Terminology
- Requirements
- Contributors' Guide
- Release Methodology
- RocksDB Users and Use Cases
- RocksDB Public Communication and Information Channels
-
Basic Operations
- Iterator
- Prefix seek
- SeekForPrev
- Tailing Iterator
- Compaction Filter
- Multi Column Family Iterator
- Read-Modify-Write (Merge) Operator
- Column Families
- Creating and Ingesting SST files
- Single Delete
- SST Partitioner
- Low Priority Write
- Time to Live (TTL) Support
- Transactions
- Snapshot
- DeleteRange
- Atomic flush
- Read-only and Secondary instances
- Approximate Size
- User-defined Timestamp
- Wide Columns
- BlobDB
- Online Verification
- Options
- MemTable
- Journal
- Cache
- Write Buffer Manager
- Compaction
- SST File Formats
- IO
- Compression
- Full File Checksum and Checksum Handoff
- Background Error Handling
- Huge Page TLB Support
- Tiered Storage (Experimental)
- Logging and Monitoring
- Known Issues
- Troubleshooting Guide
- Tests
- Tools / Utilities
-
Implementation Details
- Delete Stale Files
- Partitioned Index/Filters
- WritePrepared-Transactions
- WriteUnprepared-Transactions
- How we keep track of live SST files
- How we index SST
- Merge Operator Implementation
- RocksDB Repairer
- Write Batch With Index
- Two Phase Commit
- Iterator's Implementation
- Simulation Cache
- [To Be Deprecated] Persistent Read Cache
- DeleteRange Implementation
- unordered_write
- Extending RocksDB
- RocksJava
- Performance
- Projects Being Developed
- Misc