[#2140] engine: Fix error handling in TreeMove

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2022-12-07 16:27:13 +03:00 committed by Anton Nikiforov
parent 923f84722a
commit 0b78af467e
2 changed files with 2 additions and 1 deletions

View file

@ -50,6 +50,7 @@ Changelog for NeoFS Node
- Notary requests on shutdown (#2075)
- `neofs-cli container create ` check the sufficiency of the number of nodes in the selector for replicas (#2038)
- Data duplication during request forwarding (#2047)
- Tree service panic on `TreeMove` operation (#2140)
### Removed
- `-g` option from `neofs-cli control ...` and `neofs-cli container create` commands (#2089)

View file

@ -14,7 +14,7 @@ var _ pilorama.Forest = (*StorageEngine)(nil)
// TreeMove implements the pilorama.Forest interface.
func (e *StorageEngine) TreeMove(d pilorama.CIDDescriptor, treeID string, m *pilorama.Move) (*pilorama.LogMove, error) {
index, lst, err := e.getTreeShard(d.CID, treeID)
if err != nil || !errors.Is(err, pilorama.ErrTreeNotFound) {
if err != nil && !errors.Is(err, pilorama.ErrTreeNotFound) {
return nil, err
}