Enum CompactionReason
- Namespace
- RocksDbNet
- Assembly
- RocksDb.Net.dll
Why RocksDb ran a compaction, mapped from rocksdb::CompactionReason in
listener.h.
public enum CompactionReason
Fields
BottommostFiles = 11Level: an automatic compaction inside the bottommost level to clean up duplicate versions of the same user key, usually after a snapshot was released.
ChangeTemperature = 16Compacting in order to move files to a different temperature.
ExternalSstIngestion = 14Internal only. External SST file ingestion, accounted for as a compaction so that it takes part in conflict checking.
FifoMaxSize = 6FIFO: the total size exceeded the maximum table file size.
FifoReduceNumFiles = 7FIFO: compacting to reduce the number of files.
FifoTtl = 8FIFO: files older than the configured interval.
FilesMarkedForCompaction = 10Files marked for compaction, which is what SuggestCompactRange(ReadOnlySpan<byte>, ReadOnlySpan<byte>) does.
Flush = 13A flush, which RocksDb accounts for as a level-0 compaction.
ForcedBlobGC = 17Scheduled to force garbage collection of blob files.
LevelL0FilesNum = 1Level: the number of level-0 files exceeded Level0FileNumCompactionTrigger.
LevelMaxLevelSize = 2Level: the total size of a level exceeded its maximum.
ManualCompaction = 9A manual compaction, such as CompactRange(CompactRangeOptions, ReadOnlySpan<byte>, ReadOnlySpan<byte>).
PeriodicCompaction = 15An SST file was older than the periodic compaction interval.
ReadTriggered = 20Triggered by a high read frequency on SST files.
RefitLevel = 19Internal only. A level refit, accounted for as a compaction so that it takes part in conflict checking.
RoundRobinTtl = 18The round-robin policy's time-to-live compaction. Behaves like LevelMaxLevelSize but targets expired files.
Ttl = 12Compaction driven by time to live.
UniversalSizeAmplification = 3Universal: compacting to reduce size amplification.
UniversalSizeRatio = 4Universal: compacting to satisfy the size ratio.
UniversalSortedRunNum = 5Universal: the number of sorted runs exceeded Level0FileNumCompactionTrigger.
Unknown = 0No reason recorded.
Remarks
The values are positional in the native header, so they must match it exactly. They are written out here rather than left implicit, and asserted in the tests, because a shifted value silently mislabels every compaction an application observes.