forked from TrueCloudLab/frostfs-node
[#1996] engine: Ignore pilorama.ErrTreeNotFound
for write operations
Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
parent
a455ec18c3
commit
2ef38cfbc4
1 changed files with 3 additions and 3 deletions
|
@ -14,7 +14,7 @@ var _ pilorama.Forest = (*StorageEngine)(nil)
|
||||||
// TreeMove implements the pilorama.Forest interface.
|
// TreeMove implements the pilorama.Forest interface.
|
||||||
func (e *StorageEngine) TreeMove(d pilorama.CIDDescriptor, treeID string, m *pilorama.Move) (*pilorama.LogMove, error) {
|
func (e *StorageEngine) TreeMove(d pilorama.CIDDescriptor, treeID string, m *pilorama.Move) (*pilorama.LogMove, error) {
|
||||||
index, lst, err := e.getTreeShard(d.CID, treeID)
|
index, lst, err := e.getTreeShard(d.CID, treeID)
|
||||||
if err != nil {
|
if err != nil || !errors.Is(err, pilorama.ErrTreeNotFound) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ func (e *StorageEngine) TreeMove(d pilorama.CIDDescriptor, treeID string, m *pil
|
||||||
// TreeAddByPath implements the pilorama.Forest interface.
|
// TreeAddByPath implements the pilorama.Forest interface.
|
||||||
func (e *StorageEngine) TreeAddByPath(d pilorama.CIDDescriptor, treeID string, attr string, path []string, m []pilorama.KeyValue) ([]pilorama.LogMove, error) {
|
func (e *StorageEngine) TreeAddByPath(d pilorama.CIDDescriptor, treeID string, attr string, path []string, m []pilorama.KeyValue) ([]pilorama.LogMove, error) {
|
||||||
index, lst, err := e.getTreeShard(d.CID, treeID)
|
index, lst, err := e.getTreeShard(d.CID, treeID)
|
||||||
if err != nil {
|
if err != nil && !errors.Is(err, pilorama.ErrTreeNotFound) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ func (e *StorageEngine) TreeAddByPath(d pilorama.CIDDescriptor, treeID string, a
|
||||||
// TreeApply implements the pilorama.Forest interface.
|
// TreeApply implements the pilorama.Forest interface.
|
||||||
func (e *StorageEngine) TreeApply(d pilorama.CIDDescriptor, treeID string, m *pilorama.Move) error {
|
func (e *StorageEngine) TreeApply(d pilorama.CIDDescriptor, treeID string, m *pilorama.Move) error {
|
||||||
index, lst, err := e.getTreeShard(d.CID, treeID)
|
index, lst, err := e.getTreeShard(d.CID, treeID)
|
||||||
if err != nil {
|
if err != nil && !errors.Is(err, pilorama.ErrTreeNotFound) {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue