From a1164b2a5c5e725ef91d95667e932b24298e7709 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Thu, 26 Nov 2020 10:47:20 +0300 Subject: [PATCH] [#211] cmd/neofs-node: Add SmallSizeLimit config value of BlobStor Signed-off-by: Leonard Lyubich --- cmd/neofs-node/config.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmd/neofs-node/config.go b/cmd/neofs-node/config.go index 435c525f2d..a61656f906 100644 --- a/cmd/neofs-node/config.go +++ b/cmd/neofs-node/config.go @@ -120,6 +120,7 @@ const ( cfgBlobStorShallowDepth = "shallow_depth" cfgBlobStorTreePath = "path" cfgBlobStorTreePerm = "perm" + cfgBlobStorSmallSzLimit = "small_size_limit" cfgMetaBaseSection = "metabase" cfgMetaBasePath = "path" @@ -451,6 +452,10 @@ func initShardOptions(c *cfg) { configPath(blobPrefix, cfgBlobStorShallowDepth), ) + smallSzLimit := c.viper.GetUint64( + configPath(blobPrefix, cfgBlobStorSmallSzLimit), + ) + metaPrefix := configPath(prefix, cfgMetaBaseSection) metaPath := c.viper.GetString( @@ -473,6 +478,7 @@ func initShardOptions(c *cfg) { blobstor.WithCompressObjects(compressObjects, c.log), blobstor.WithTreeRootPerm(blobPerm), blobstor.WithShallowDepth(shallowDepth), + blobstor.WithSmallSizeLimit(smallSzLimit), ), shard.WithMetaBaseOptions( meta.WithLogger(c.log), @@ -485,6 +491,7 @@ func initShardOptions(c *cfg) { zap.Stringer("BLOB permissions", blobPerm), zap.Bool("BLOB compress", compressObjects), zap.Int("BLOB shallow depth", shallowDepth), + zap.Uint64("BLOB small size limit", smallSzLimit), zap.String("metabase path", metaPath), zap.Stringer("metabase permissions", metaPerm), )