Skip to content

Commit

Permalink
chore: add some comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Fischer0522 committed Sep 18, 2024
1 parent 731836c commit 821e393
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion core/benches/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ mod benches {
),
AeadKey::default(),
None,
true,
false,
None,
)?),

Expand Down
2 changes: 2 additions & 0 deletions core/src/layers/5-disk/gc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ impl<D: BlockSet + 'static> GcWorker<D> {

debug_assert_eq!(victim_hbas.len(), target_hbas.len());
for (victim_hba, target_hba) in victim_hbas.iter().zip(target_hbas.clone()) {
// TODO: use ReverseIndexTable and LogicalBlockTable to discard the invalid block
let mut victim_block = Buf::alloc(1)?;
self.user_data_disk
.read(*victim_hba, victim_block.as_mut())?;
Expand All @@ -290,6 +291,7 @@ impl<D: BlockSet + 'static> GcWorker<D> {
Ok(victim_hbas.into_iter().zip(target_hbas).collect())
}

// TODO: Support more rules
fn trigger_gc(&self, victim: Option<&Victim>) -> bool {
if victim.is_none() {
return false;
Expand Down

0 comments on commit 821e393

Please sign in to comment.