MCPcopy
hub / github.com/lindb/lindb / IsTrivialMove

Method IsTrivialMove

kv/version/compact.go:47–49  ·  view source on GitHub ↗

IsTrivialMove returns a trivial compaction that can be implemented by just moving a single input file to the next level (no merging or splitting). returns true: can just move file to the next level.

()

Source from the content-addressed store, hash-verified

45// moving a single input file to the next level (no merging or splitting).
46// returns true: can just move file to the next level.
47func (c *Compaction) IsTrivialMove() bool {
48 return len(c.levelInputs) == 1 && len(c.levelUpInputs) == 0
49}
50
51// GetLevelFiles returns low level files.
52func (c *Compaction) GetLevelFiles() []*FileMeta {

Callers 2

TestCompactionFunction · 0.95
RunMethod · 0.80

Calls

no outgoing calls

Tested by 1

TestCompactionFunction · 0.76