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

@@ -189,7 +189,7 @@ impl RegionServer {
pub async fn region_disk_usage(&self, region_id: RegionId) -> Option<i64> {
match self.inner.region_map.get(&region_id) {
Some(e) => e.region_disk_usage(region_id).await,
Some(e) => e.region_disk_usage(region_id),
None => None,
}
}

View File

@@ -200,7 +200,7 @@ impl RegionEngine for MockRegionEngine {
unimplemented!()
}
async fn region_disk_usage(&self, _region_id: RegionId) -> Option<i64> {
fn region_disk_usage(&self, _region_id: RegionId) -> Option<i64> {
unimplemented!()
}