add compaction controller + simulator

Signed-off-by: Alex Chi Z <iskyzh@gmail.com>
This commit is contained in:
Alex Chi Z
2024-01-16 16:30:01 +08:00
parent 327f6badef
commit a9fca43f79
11 changed files with 349 additions and 143 deletions

View File

@@ -24,7 +24,7 @@ impl BlockBuilder {
fn estimated_size(&self) -> usize {
SIZEOF_U16 /* number of key-value pairs in the block */ + self.offsets.len() * SIZEOF_U16 /* offsets */ + self.data.len()
/* key-value pairs */
// key-value pairs
}
/// Adds a key-value pair to the block. Returns false when the block is full.