[#211] cmd/neofs-node: Add SmallSizeLimit config value of BlobStor

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-11-26 10:47:20 +03:00 committed by Alex Vanin
parent b9054e2ee0
commit a1164b2a5c

View file

@ -120,6 +120,7 @@ const (
cfgBlobStorShallowDepth = "shallow_depth" cfgBlobStorShallowDepth = "shallow_depth"
cfgBlobStorTreePath = "path" cfgBlobStorTreePath = "path"
cfgBlobStorTreePerm = "perm" cfgBlobStorTreePerm = "perm"
cfgBlobStorSmallSzLimit = "small_size_limit"
cfgMetaBaseSection = "metabase" cfgMetaBaseSection = "metabase"
cfgMetaBasePath = "path" cfgMetaBasePath = "path"
@ -451,6 +452,10 @@ func initShardOptions(c *cfg) {
configPath(blobPrefix, cfgBlobStorShallowDepth), configPath(blobPrefix, cfgBlobStorShallowDepth),
) )
smallSzLimit := c.viper.GetUint64(
configPath(blobPrefix, cfgBlobStorSmallSzLimit),
)
metaPrefix := configPath(prefix, cfgMetaBaseSection) metaPrefix := configPath(prefix, cfgMetaBaseSection)
metaPath := c.viper.GetString( metaPath := c.viper.GetString(
@ -473,6 +478,7 @@ func initShardOptions(c *cfg) {
blobstor.WithCompressObjects(compressObjects, c.log), blobstor.WithCompressObjects(compressObjects, c.log),
blobstor.WithTreeRootPerm(blobPerm), blobstor.WithTreeRootPerm(blobPerm),
blobstor.WithShallowDepth(shallowDepth), blobstor.WithShallowDepth(shallowDepth),
blobstor.WithSmallSizeLimit(smallSzLimit),
), ),
shard.WithMetaBaseOptions( shard.WithMetaBaseOptions(
meta.WithLogger(c.log), meta.WithLogger(c.log),
@ -485,6 +491,7 @@ func initShardOptions(c *cfg) {
zap.Stringer("BLOB permissions", blobPerm), zap.Stringer("BLOB permissions", blobPerm),
zap.Bool("BLOB compress", compressObjects), zap.Bool("BLOB compress", compressObjects),
zap.Int("BLOB shallow depth", shallowDepth), zap.Int("BLOB shallow depth", shallowDepth),
zap.Uint64("BLOB small size limit", smallSzLimit),
zap.String("metabase path", metaPath), zap.String("metabase path", metaPath),
zap.Stringer("metabase permissions", metaPerm), zap.Stringer("metabase permissions", metaPerm),
) )