From c1e04534c39f9b3d20dff43d3bf3f5b1f3471e1d Mon Sep 17 00:00:00 2001 From: aoiasd <45024769+aoiasd@users.noreply.github.com> Date: Tue, 9 Jul 2024 18:18:12 +0800 Subject: [PATCH] enhance:change access log write cache default config (#34354) Signed-off-by: aoiasd --- configs/milvus.yaml | 3 ++- pkg/util/paramtable/component_param.go | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/configs/milvus.yaml b/configs/milvus.yaml index 3f78c38d94..7196a666f6 100644 --- a/configs/milvus.yaml +++ b/configs/milvus.yaml @@ -226,7 +226,8 @@ proxy: localPath: /tmp/milvus_access filename: # Log filename, leave empty to use stdout. maxSize: 64 # Max size for a single file, in MB. - cacheSize: 10240 # Size of log of memory cache, in B + cacheSize: 0 # Size of log write cache, in B + cacheFlushInterval: 3 # time interval of auto flush write cache, in Seconds. (Close auto flush if interval was 0) rotatedTime: 0 # Max time for single access log file in seconds remotePath: access_log/ # File path in minIO remoteMaxTime: 0 # Max time for log file in minIO, in hours diff --git a/pkg/util/paramtable/component_param.go b/pkg/util/paramtable/component_param.go index fce8f78c8f..4c4cf6499f 100644 --- a/pkg/util/paramtable/component_param.go +++ b/pkg/util/paramtable/component_param.go @@ -1325,17 +1325,17 @@ please adjust in embedded Milvus: false`, p.AccessLog.CacheSize = ParamItem{ Key: "proxy.accessLog.cacheSize", Version: "2.3.2", - DefaultValue: "10240", - Doc: "Size of log of memory cache, in B. (Close write cache if szie was 0", + DefaultValue: "0", + Doc: "Size of log of write cache, in B. (Close write cache if size was 0", Export: true, } p.AccessLog.CacheSize.Init(base.mgr) p.AccessLog.CacheFlushInterval = ParamItem{ - Key: "proxy.accessLog.cacheSize", + Key: "proxy.accessLog.cacheFlushInterval", Version: "2.4.0", DefaultValue: "3", - Doc: "time interval of auto flush memory cache, in Seconds. (Close auto flush if interval was 0)", + Doc: "time interval of auto flush write cache, in Seconds. (Close auto flush if interval was 0)", } p.AccessLog.CacheFlushInterval.Init(base.mgr)