From 09faca034c089b99da140519ef723e03f2c2238b Mon Sep 17 00:00:00 2001 From: Alexander Chuprov Date: Fri, 10 Jan 2025 14:53:10 +0300 Subject: [PATCH 1/2] [#1593] node: Fix initialization of frostfsid cache Signed-off-by: Alexander Chuprov --- cmd/frostfs-node/container.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/frostfs-node/container.go b/cmd/frostfs-node/container.go index be0acf738..98fea9f41 100644 --- a/cmd/frostfs-node/container.go +++ b/cmd/frostfs-node/container.go @@ -43,7 +43,7 @@ func initContainerService(_ context.Context, c *cfg) { fatalOnErr(err) cacheSize := morphconfig.FrostfsIDCacheSize(c.appCfg) - if cacheSize > 0 { + if cacheSize > 0 && c.cfgMorph.cacheTTL > 0 { frostfsIDSubjectProvider = newMorphFrostfsIDCache(frostfsIDSubjectProvider, int(cacheSize), c.cfgMorph.cacheTTL, metrics.NewCacheMetrics("frostfs_id")) } -- 2.45.3 From a2485637bb91fcf976ce21cfa09af95f12c27c94 Mon Sep 17 00:00:00 2001 From: Alexander Chuprov Date: Fri, 10 Jan 2025 15:13:10 +0300 Subject: [PATCH 2/2] [#1593] node/config_example: Add description of morph/cache_ttl=0 behavior Signed-off-by: Alexander Chuprov --- config/example/node.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/example/node.yaml b/config/example/node.yaml index a179b4704..c5acf5386 100644 --- a/config/example/node.yaml +++ b/config/example/node.yaml @@ -79,7 +79,8 @@ contracts: # side chain NEOFS contract script hashes; optional, override values morph: dial_timeout: 30s # timeout for side chain NEO RPC client connection - cache_ttl: 15s # Sidechain cache TTL value (min interval between similar calls). Negative value disables caching. + cache_ttl: 15s # Sidechain cache TTL value (min interval between similar calls). + # Negative value disables caching. A zero value sets the default value. # Default value: block time. It is recommended to have this value less or equal to block time. # Cached entities: containers, container lists, eACL tables. container_cache_size: 100 # container_cache_size is is the maximum number of containers in the cache. -- 2.45.3