MCPcopy Index your code
hub / github.com/dgraph-io/badger / isLevel0Compactable

Method isLevel0Compactable

levels.go:412–414  ·  view source on GitHub ↗

Returns true if level zero may be compacted, without accounting for compactions that already might be happening.

()

Source from the content-addressed store, hash-verified

410// Returns true if level zero may be compacted, without accounting for compactions that already
411// might be happening.
412func (s *levelsController) isLevel0Compactable() bool {
413 return s.levels[0].numTables() >= s.kv.opt.NumLevelZeroTables
414}
415
416// Returns true if the non-zero level may be compacted. delSize provides the size of the tables
417// which are currently being compacted so that we treat them as already having started being

Callers 2

pickCompactLevelsMethod · 0.95
addLevel0TableMethod · 0.95

Calls 1

numTablesMethod · 0.80

Tested by

no test coverage detected