Kaynağa Gözat

fix: drop the false 'removed in v2.1' warning for the memory keys

max_memory_mb and the eviction keys logged a v2.0 deprecation at every
boot promising removal in v2.1. They were never removed and are not being
removed: they set the budget, eviction and pressure (emergency refuses
writes). Reported by smartbotic, who read the warning as stale and asked
what to watch once the budget is gone.
fszontagh 1 ay önce
ebeveyn
işleme
00f25680f4
3 değiştirilmiş dosya ile 16 ekleme ve 29 silme
  1. 7 0
      CHANGELOG.md
  2. 0 0
      CLAUDE.md
  3. 9 29
      service/src/database_service.cpp

+ 7 - 0
CHANGELOG.md

@@ -12,6 +12,13 @@ consumer-facing usage is in `docs/integration-guide.md`.
 
 ## Unreleased
 
+### Fixed
+- **[server]** Every boot logged eight "v2.0 deprecation: storage.memory.<key>
+  is deprecated and will be removed in v2.1" warnings for `max_memory_mb` and
+  the eviction keys. They were never removed and no removal is planned: they
+  set the memory budget, eviction and the pressure levels (emergency refuses
+  writes). The warning is gone.
+
 ## 2.21.2 - 2026-10-27 (bug fix, server only)
 
 ### Fixed

Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
CLAUDE.md


+ 9 - 29
service/src/database_service.cpp

@@ -1683,35 +1683,15 @@ DatabaseService::Config DatabaseService::parseConfig(const nlohmann::json& json)
         if (db.contains("memory")) {
             auto& memory = db["memory"];
 
-            // Deprecation log. These knobs control MemoryStore eviction, which
-            // is still active for the MemoryStore-side mirror but does NOT bound
-            // RSS since v2.0 (LMDB mmap is the dominant RSS contributor). The
-            // substrate-level equivalent is the LMDB env mapsize and the OS page
-            // cache.
-            //
-            // They disappear when the write-handler migration deletes MemoryStore
-            // (docs/ROADMAP.md, "Pending"). An earlier revision of this comment
-            // promised a v2.1 rename to `buffer_pool_size_mb` "per the Phase C
-            // plan"; that plan was superseded by LMDB before it was written, no
-            // such knob exists, and the rename is not planned.
-            for (const char* deprecated : {"max_memory_mb",
-                                           "eviction_threshold_percent",
-                                           "eviction_target_percent",
-                                           "eviction_check_interval_ms",
-                                           "eviction_chunk_size",
-                                           "eviction_chunk_pause_ms",
-                                           "max_eviction_passes_per_trigger",
-                                           "hot_write_floor_ms",
-                                           "memory_priority"}) {
-                if (memory.contains(deprecated)) {
-                    spdlog::warn("v2.0 deprecation: storage.memory.{} is deprecated "
-                                 "and will be removed in v2.1. v2.0 RSS is bounded "
-                                 "by the LMDB env mapsize + OS page cache, not by "
-                                 "MemoryStore eviction. Setting still applied to "
-                                 "the MemoryStore mirror for back-compat.",
-                                 deprecated);
-                }
-            }
+            // No deprecation warning (removed after 2.21.2). From v2.0 these
+            // keys logged "deprecated and will be removed in v2.1" at every
+            // boot. They were never removed and no removal is planned: they set
+            // MemoryStore's budget, eviction and pressure levels, and emergency
+            // pressure refuses writes, so they are live controls (and since
+            // 2.21.2 the budget covers vectors too). The warning read as stale
+            // output from a 2.0 build and invited an operator to delete the
+            // budget. MemoryStore goes, and these keys with it, only when the
+            // write-handler migration lands (docs/ROADMAP.md, "Pending").
 
             config.maxMemoryMb = memory.value("max_memory_mb", config.maxMemoryMb);
             config.evictionThresholdPercent = memory.value("eviction_threshold_percent", config.evictionThresholdPercent);

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor