From ed0f191e1a4f24e41112f5665d29074885eee327 Mon Sep 17 00:00:00 2001 From: Zhengchao An Date: Sun, 28 Jun 2026 21:25:42 +0800 Subject: [PATCH] docs: document global singleton migration plan (#730) (#4015) docs: document global singleton migration plan Add comments documenting the Tier A/B classification and migration plan for global singletons in ecstore runtime. Refs #730 --- crates/ecstore/src/runtime/global.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/ecstore/src/runtime/global.rs b/crates/ecstore/src/runtime/global.rs index ab03648ca..4999e4bab 100644 --- a/crates/ecstore/src/runtime/global.rs +++ b/crates/ecstore/src/runtime/global.rs @@ -38,6 +38,13 @@ pub const DISK_MIN_INODES: u64 = 1000; pub const DISK_FILL_FRACTION: f64 = 0.99; pub const DISK_RESERVE_FRACTION: f64 = 0.15; +// Global singletons for backward compatibility with MinIO port. +// These should be migrated to AppContext over time. +// See issue #730 for migration plan. +// +// Tier A (needs migration): GLOBAL_OBJECT_API, GLOBAL_IsErasure*, GLOBAL_LOCAL_DISK_*, +// GLOBAL_RootDiskThreshold, GLOBAL_LifecycleSys, GLOBAL_EventNotifier, etc. +// Tier B (keep as static): GLOBAL_RUSTFS_PORT, GLOBAL_REGION, env var caches, etc. lazy_static! { static ref GLOBAL_RUSTFS_PORT: OnceLock = OnceLock::new(); static ref globalDeploymentIDPtr: OnceLock = OnceLock::new();