|
|
@@ -468,6 +468,32 @@ DatabaseService::Config DatabaseService::parseConfig(const nlohmann::json& json)
|
|
|
// Memory eviction settings
|
|
|
if (db.contains("memory")) {
|
|
|
auto& memory = db["memory"];
|
|
|
+
|
|
|
+ // v2.0 Stage 8 — deprecation log. These knobs control MemoryStore
|
|
|
+ // eviction, which is still active for the MemoryStore-side mirror
|
|
|
+ // but does NOT bound RSS in v2.0 (LMDB mmap is the dominant RSS
|
|
|
+ // contributor). The substrate-level equivalent is the LMDB env
|
|
|
+ // mapsize and OS page cache. v2.1 will rename `max_memory_mb` to
|
|
|
+ // `buffer_pool_size_mb` per the Phase C plan.
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
config.maxMemoryMb = memory.value("max_memory_mb", config.maxMemoryMb);
|
|
|
config.evictionThresholdPercent = memory.value("eviction_threshold_percent", config.evictionThresholdPercent);
|
|
|
config.evictionTargetPercent = memory.value("eviction_target_percent", config.evictionTargetPercent);
|