Returns true if the non-zero level may be compacted. delSize provides the size of the tables which are currently being compacted so that we treat them as already having started being compacted (because they have been, yet their size is already counted in getTotalSize).
(delSize int64)
| 417 | // which are currently being compacted so that we treat them as already having started being |
| 418 | // compacted (because they have been, yet their size is already counted in getTotalSize). |
| 419 | func (l *levelHandler) isCompactable(delSize int64) bool { |
| 420 | return l.getTotalSize()-delSize >= l.maxTotalSize |
| 421 | } |
| 422 | |
| 423 | type compactionPriority struct { |
| 424 | level int |
no test coverage detected