refactor(runtime): hide local disk id global (#4047)

This commit is contained in:
Zhengchao An
2026-06-29 16:33:36 +08:00
committed by GitHub
parent ad6be6a167
commit ecbc5385d3
4 changed files with 23 additions and 7 deletions
+5
View File
@@ -401,6 +401,11 @@ pub(crate) async fn local_disk_path_by_id(disk_id: &Uuid) -> Option<String> {
GLOBAL_LOCAL_DISK_ID_MAP.read().await.get(disk_id).cloned()
}
#[cfg(test)]
pub(crate) async fn clear_local_disk_id_map_for_test() {
GLOBAL_LOCAL_DISK_ID_MAP.write().await.clear();
}
pub(crate) async fn record_local_disk_id(disk_id: Uuid, endpoint: String) {
GLOBAL_LOCAL_DISK_ID_MAP.write().await.insert(disk_id, endpoint);
}