[#661] blobovniczatree: Make Rebuild failover safe
Now move info stores in blobovnicza, so in case of failover rebuild completes previous operation first. Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
da4fee2d0b
commit
b2769ca3de
13 changed files with 615 additions and 35 deletions
|
@ -3,6 +3,7 @@ package blobovniczatree
|
|||
import (
|
||||
"context"
|
||||
"encoding/hex"
|
||||
"errors"
|
||||
"time"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/internal/logs"
|
||||
|
@ -18,6 +19,8 @@ import (
|
|||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
var errObjectIsDeleteProtected = errors.New("object is delete protected")
|
||||
|
||||
// Delete deletes object from blobovnicza tree.
|
||||
//
|
||||
// If blobocvnicza ID is specified, only this blobovnicza is processed.
|
||||
|
@ -49,6 +52,10 @@ func (b *Blobovniczas) Delete(ctx context.Context, prm common.DeletePrm) (res co
|
|||
return common.DeleteRes{}, errRebuildInProgress
|
||||
}
|
||||
|
||||
if b.deleteProtectedObjects.Contains(prm.Address) {
|
||||
return common.DeleteRes{}, errObjectIsDeleteProtected
|
||||
}
|
||||
|
||||
var bPrm blobovnicza.DeletePrm
|
||||
bPrm.SetAddress(prm.Address)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue