docs: update solution & starter code documentation for day 2 (#20)

* feat(docs): update day 2 starter code documentation

* feat(docs): update day 2 solution code documentation
This commit is contained in:
Xu
2023-07-11 12:05:40 +08:00
committed by GitHub
parent de7f2ec263
commit a5ac71c99f
4 changed files with 32 additions and 8 deletions

View File

@@ -21,12 +21,14 @@ impl SsTableBuilder {
unimplemented!()
}
/// Adds a key-value pair to SSTable
/// Adds a key-value pair to SSTable.
/// Note: You should split a new block when the current block is full.(`std::mem::replace` may be of help here)
pub fn add(&mut self, key: &[u8], value: &[u8]) {
unimplemented!()
}
/// Get the estimated size of the SSTable.
/// Since the data blocks contain much more data than meta blocks, just return the size of data blocks here.
pub fn estimated_size(&self) -> usize {
unimplemented!()
}