[#2154] services/tree: Do not log an error when synchronizing container of 1 node
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
387d1e2977
commit
3bb5a320d7
2 changed files with 3 additions and 3 deletions
|
@ -60,6 +60,7 @@ Changelog for NeoFS Node
|
||||||
- Incomplete object put errors do contain the deepest error's message (#2092)
|
- Incomplete object put errors do contain the deepest error's message (#2092)
|
||||||
- Prioritize internal addresses for clients (#2156)
|
- Prioritize internal addresses for clients (#2156)
|
||||||
- Force object removal via control service (#2145)
|
- Force object removal via control service (#2145)
|
||||||
|
- Synchronizing a tree now longer reports an error for a single-node container (#2154)
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
- `-g` option from `neofs-cli control ...` and `neofs-cli container create` commands (#2089)
|
- `-g` option from `neofs-cli control ...` and `neofs-cli container create` commands (#2089)
|
||||||
|
|
|
@ -21,7 +21,6 @@ import (
|
||||||
// ErrNotInContainer is returned when operation could not be performed
|
// ErrNotInContainer is returned when operation could not be performed
|
||||||
// because the node is not included in the container.
|
// because the node is not included in the container.
|
||||||
var ErrNotInContainer = errors.New("node is not in container")
|
var ErrNotInContainer = errors.New("node is not in container")
|
||||||
var errNoOtherNodes = errors.New("no nodes to fetch trees from")
|
|
||||||
|
|
||||||
// SynchronizeAllTrees synchronizes all the trees of the container. It fetches
|
// SynchronizeAllTrees synchronizes all the trees of the container. It fetches
|
||||||
// tree IDs from the other container nodes. Returns ErrNotInContainer if the node
|
// tree IDs from the other container nodes. Returns ErrNotInContainer if the node
|
||||||
|
@ -43,7 +42,7 @@ func (s *Service) SynchronizeAllTrees(ctx context.Context, cid cid.ID) error {
|
||||||
|
|
||||||
nodes = randomizeNodeOrder(nodes, pos)
|
nodes = randomizeNodeOrder(nodes, pos)
|
||||||
if len(nodes) == 0 {
|
if len(nodes) == 0 {
|
||||||
return errNoOtherNodes
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
rawCID := make([]byte, sha256.Size)
|
rawCID := make([]byte, sha256.Size)
|
||||||
|
@ -112,7 +111,7 @@ func (s *Service) SynchronizeTree(ctx context.Context, cid cid.ID, treeID string
|
||||||
|
|
||||||
nodes = randomizeNodeOrder(nodes, pos)
|
nodes = randomizeNodeOrder(nodes, pos)
|
||||||
if len(nodes) == 0 {
|
if len(nodes) == 0 {
|
||||||
return errNoOtherNodes
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
return s.synchronizeTree(ctx, d, treeID, nodes)
|
return s.synchronizeTree(ctx, d, treeID, nodes)
|
||||||
|
|
Loading…
Reference in a new issue