From 295178df8035b2d5734b3585d9aea6049fbfaf73 Mon Sep 17 00:00:00 2001 From: houseme Date: Sun, 28 Jun 2026 07:25:15 +0800 Subject: [PATCH] feat(get): SF03 - metadata cache TTL increase Increase metadata cache TTL from 250ms to 2s and capacity from 1024 to 4096 entries. Changes: - GET_OBJECT_METADATA_CACHE_TTL: 250ms -> 2s - GET_OBJECT_METADATA_CACHE_MAX_ENTRIES: 1024 -> 4096 All mutation paths already call invalidate_get_object_metadata_cache, so the longer TTL is safe. Expected impact: 10-50x improvement for hot objects. Closes rustfs/backlog#768 Co-Authored-By: heihutu --- crates/ecstore/src/set_disk/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/ecstore/src/set_disk/mod.rs b/crates/ecstore/src/set_disk/mod.rs index 921d85d0e..b046f6ec8 100644 --- a/crates/ecstore/src/set_disk/mod.rs +++ b/crates/ecstore/src/set_disk/mod.rs @@ -329,8 +329,8 @@ fn adaptive_duplex_buffer_size(object_size: i64) -> usize { const DISK_ONLINE_TIMEOUT: Duration = Duration::from_secs(1); const DISK_HEALTH_CACHE_TTL: Duration = Duration::from_millis(750); -const GET_OBJECT_METADATA_CACHE_TTL: Duration = Duration::from_millis(250); -const GET_OBJECT_METADATA_CACHE_MAX_ENTRIES: usize = 1024; +const GET_OBJECT_METADATA_CACHE_TTL: Duration = Duration::from_secs(2); // Increased from 250ms to 2s +const GET_OBJECT_METADATA_CACHE_MAX_ENTRIES: usize = 4096; // Increased from 1024 to 4096 // --- Codec Streaming Configuration ---