[#1559] local_object_storage: Allow to set mode for all components

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2022-07-05 07:55:46 +03:00 committed by fyrchik
parent 1e786233bf
commit 3df62769c0
16 changed files with 230 additions and 28 deletions

View file

@ -835,6 +835,11 @@ func (b *blobovniczas) init() error {
return zstdD(data)
}
if b.readOnly {
b.log.Debug("read-only mode, skip blobovniczas initialization...")
return nil
}
return b.iterateBlobovniczas(false, func(p string, blz *blobovnicza.Blobovnicza) error {
if err := blz.Init(); err != nil {
return fmt.Errorf("could not initialize blobovnicza structure %s: %w", p, err)