fix: avoid acquiring lock during reading stats (#4070)

* fix: avoid acquiring lock during reading stats

* chore: apply suggestions from CR

* chore: apply suggestions from CR
This commit is contained in:
Weny Xu
2024-05-30 16:08:04 +09:00
committed by GitHub
parent 7de336f087
commit eab309ff7e
14 changed files with 98 additions and 47 deletions

View File

@@ -200,7 +200,7 @@ pub trait RegionEngine: Send + Sync {
async fn get_metadata(&self, region_id: RegionId) -> Result<RegionMetadataRef, BoxedError>;
/// Retrieves region's disk usage.
async fn region_disk_usage(&self, region_id: RegionId) -> Option<i64>;
fn region_disk_usage(&self, region_id: RegionId) -> Option<i64>;
/// Stops the engine
async fn stop(&self) -> Result<(), BoxedError>;