Table of Contents

Enum CompactionPri

Namespace
RocksDbNet
Assembly
RocksDb.Net.dll

How RocksDb picks which file to compact next within a level, mapped from rocksdb::CompactionPri in advanced_options.h.

public enum CompactionPri

Fields

ByCompensatedSize = 0

Prefer the file with the largest size, adjusted for how much of it is deletions.

MinOverlappingRatio = 3

Prefer the file whose compaction would rewrite the least data from the next level. RocksDb's default, and usually the cheapest.

OldestLargestSeqFirst = 1

Prefer the file whose newest data is oldest, which suits workloads that write in key order and then stop touching old keys.

OldestSmallestSeqFirst = 2

Prefer the file whose oldest data is oldest, which suits uniformly random updates.

RoundRobin = 4

Work through the key space in order, so that every range is compacted eventually rather than only the hot ones.

Remarks

Only meaningful for level-style compaction.