Skip to content

Commit

Permalink
chore: remove old metrics, reclaim drop indices first (#60)
Browse files Browse the repository at this point in the history
Signed-off-by: MrCroxx <mrcroxx@outlook.com>
  • Loading branch information
MrCroxx committed Jul 10, 2023
1 parent e502b30 commit 296c51d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 115 deletions.
8 changes: 4 additions & 4 deletions foyer-storage/src/reclaimer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,10 @@ where

let region = self.region_manager.region(&task.region_id);

// keep region totally exclusive while reclamation
// step 1: drop indices
let _indices = self.indices.take_region(&task.region_id);

// after drop indices and acquire exclusive lock, no writers or readers are supposed to access the region
let guard = region.exclusive(false, false, false).await;

tracing::trace!(
Expand All @@ -199,9 +202,6 @@ where
guard.physical_readers()
);

// step 1: drop indices
let _indices = self.indices.take_region(&task.region_id);

// step 2: do reinsertion
// TODO(MrCroxx): do reinsertion

Expand Down
2 changes: 0 additions & 2 deletions foyer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
#![feature(trait_alias)]
#![feature(pattern)]

mod metrics;

pub trait Weight {
fn weight(&self) -> usize;
}
Expand Down
109 changes: 0 additions & 109 deletions foyer/src/metrics.rs

This file was deleted.

0 comments on commit 296c51d

Please sign in to comment.