Expand description
Inputs to a manual compaction and read only views of what one did.
Two independent halves live here.
CompactionOptions is the owned options object for CompactFiles, the manual
compaction entry point that takes an explicit list of input files. It carries the output
compression, the output file size limit, the subcompaction count, the trivial move
switch, the output temperature override, and an optional CompactionCancellationToken
that lets another thread abort the job while it runs.
Everything else is a borrowed view over data RocksDB hands to an event listener:
CompactionJobStats, CompactionFileInfo, BlobFileAdditionInfo, and
BlobFileGarbageInfo. You never build or own one of these. RocksDB owns the underlying
object and it stays alive only as long as the job info it was read from, so the 'a
lifetime ties each view and every byte slice it hands back to that borrow.
String-like getters return raw bytes rather than str. RocksDB does not guarantee UTF-8
for key prefixes or file paths, and the slices point straight into the C++ strings, so
reading them copies and allocates nothing.
Structsยง
- Blob
File Addition Info - A blob file created by a flush or compaction, borrowed from the job info that listed it.
- Blob
File Garbage Info - Garbage a compaction produced in an existing blob file, borrowed from the job info that listed it.
- Compaction
Cancellation Token - A cancellation flag that aborts an in progress
CompactFilesjob. - Compaction
File Info - One input or output file of a compaction, borrowed from the job info that listed it.
- Compaction
JobStats - What one compaction job did, borrowed from the event that reported it.
- Compaction
Options - Options for a
CompactFilescall, which compacts an explicit list of input files.