-
Notifications
You must be signed in to change notification settings - Fork 599
Open
Description
There has already been a function estimated_size in SsTableBuilder. I think it is fair to add the same function to BlockBuilder structure:
impl BlockBuilder {
pub fn estimated_size(&self) -> usize {}
}
Doing this has two benefits:
- Making the
estimated_sizeinSsTableBuildermore precise:
pub fn estimated_size(&self) -> usize {
self.data.len() + self.builder.estimated_size()
}
Because during the process of building table, there may be some data in block builder that are not taken into count.
- In function
compactofcompact.rs, we can useestimated_sizeofSsTableBuilderto find if there are some data left:
if builder.estimated_size() > 0 {}
I have read your code in checkpoint, and I think this eliminates the need to use Option as a wrapper of SsTableBuilder.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels