[#868] blobstor: initialize (de-)compressors in Init

Do not log in options constructors. Also failure to
initialize compression module (possibly due to invalid options) is
certainly an error deserving proper treatment.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2021-10-07 17:19:55 +03:00 committed by Leonard Lyubich
parent fa1dc31320
commit cc377b34d2
4 changed files with 22 additions and 24 deletions

View file

@ -385,7 +385,7 @@ func initShardOptions(c *cfg) {
shard.WithRefillMetabase(sc.RefillMetabase()),
shard.WithBlobStorOptions(
blobstor.WithRootPath(blobStorCfg.Path()),
blobstor.WithCompressObjects(blobStorCfg.Compress(), c.log),
blobstor.WithCompressObjects(blobStorCfg.Compress()),
blobstor.WithRootPerm(blobStorCfg.Perm()),
blobstor.WithShallowDepth(blobStorCfg.ShallowDepth()),
blobstor.WithSmallSizeLimit(blobStorCfg.SmallSizeLimit()),