Skip to content

Commit

Permalink
feat(storage): adapt to foyer without ring buffer and try avoid copy (#…
Browse files Browse the repository at this point in the history
…13987)

Signed-off-by: MrCroxx <[email protected]>
  • Loading branch information
MrCroxx authored Dec 19, 2023
1 parent bbc5bd8 commit 1cacc07
Show file tree
Hide file tree
Showing 5 changed files with 377 additions and 116 deletions.
32 changes: 24 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/storage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dyn-clone = "1.0.14"
either = "1"
enum-as-inner = "0.6"
fail = "0.5"
foyer = "0.2"
foyer = "0.3"
futures = { version = "0.3", default-features = false, features = ["alloc"] }
futures-async-stream = { workspace = true }
hex = "0.4"
Expand Down
3 changes: 2 additions & 1 deletion src/storage/src/hummock/event_handler/refiller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ impl CacheRefillTask {
fn get_units_to_refill_by_inheritance(
context: &CacheRefillContext,
ssts: &[TableHolder],
parent_ssts: &[impl Deref<Target = Box<Sstable>>],
parent_ssts: &[impl Deref<Target = Sstable>],
) -> HashSet<SstableUnit> {
let mut res = HashSet::default();

Expand Down Expand Up @@ -606,6 +606,7 @@ impl CacheRefillTask {
bytes,
uncompressed_capacity: writer.weight() - writer.key().serialized_len(),
};

writer.force();
// TODO(MrCroxx): compress if raw is not compressed?
// skip compression for it may already be compressed.
Expand Down
Loading

0 comments on commit 1cacc07

Please sign in to comment.