forked from TrueCloudLab/frostfs-node
[#2057] blobstor: Block operations on a mode change
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
1779664644
commit
fa231b8c56
7 changed files with 21 additions and 0 deletions
|
@ -16,6 +16,9 @@ import (
|
|||
//
|
||||
// If handler returns an error, method wraps and returns it immediately.
|
||||
func (b *BlobStor) Iterate(prm common.IteratePrm) (common.IterateRes, error) {
|
||||
b.modeMtx.RLock()
|
||||
defer b.modeMtx.RUnlock()
|
||||
|
||||
for i := range b.storage {
|
||||
_, err := b.storage[i].Storage.Iterate(prm)
|
||||
if err != nil && !prm.IgnoreErrors {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue