implement 2.7

Signed-off-by: Alex Chi <iskyzh@gmail.com>
This commit is contained in:
Alex Chi
2024-01-25 21:53:47 +08:00
parent 8dbaf54e38
commit 89acc23208
16 changed files with 237 additions and 81 deletions

View File

@@ -70,7 +70,9 @@ impl SsTableBuilder {
first_key: std::mem::take(&mut self.first_key).into_key_bytes(),
last_key: std::mem::take(&mut self.last_key).into_key_bytes(),
});
let checksum = crc32fast::hash(&encoded_block);
self.data.extend(encoded_block);
self.data.put_u32(checksum);
}
/// Builds the SSTable and writes it to the given path. Use the `FileObject` structure to manipulate the disk objects.