[#1181] shard: Set Disabled as default mode for components

Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
Anton Nikiforov 2024-06-10 17:48:05 +03:00
parent 6067e644d6
commit 6bec1b9d89
4 changed files with 4 additions and 1 deletions

View file

@ -54,6 +54,7 @@ func initConfig(c *cfg) {
// New creates, initializes and returns new BlobStor instance. // New creates, initializes and returns new BlobStor instance.
func New(opts ...Option) *BlobStor { func New(opts ...Option) *BlobStor {
bs := new(BlobStor) bs := new(BlobStor)
bs.mode = mode.Disabled
initConfig(&bs.cfg) initConfig(&bs.cfg)
for i := range opts { for i := range opts {

View file

@ -107,6 +107,7 @@ func New(opts ...Option) *DB {
matchBucket: stringCommonPrefixMatcherBucket, matchBucket: stringCommonPrefixMatcherBucket,
}, },
}, },
mode: mode.Disabled,
} }
} }

View file

@ -81,6 +81,7 @@ func NewBoltForest(opts ...Option) ForestStorage {
openFile: os.OpenFile, openFile: os.OpenFile,
metrics: &noopMetrics{}, metrics: &noopMetrics{},
}, },
mode: mode.Disabled,
} }
for i := range opts { for i := range opts {

View file

@ -60,7 +60,7 @@ var defaultBucket = []byte{0}
func New(opts ...Option) Cache { func New(opts ...Option) Cache {
c := &cache{ c := &cache{
flushCh: make(chan objectInfo), flushCh: make(chan objectInfo),
mode: mode.ReadWrite, mode: mode.Disabled,
compressFlags: make(map[string]struct{}), compressFlags: make(map[string]struct{}),
options: options{ options: options{