forked from TrueCloudLab/frostfs-node
[#1902] node: Sync all the trees on bootstrap
Do not limit synchronization by "system" and "version" tree IDs. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
1766ca2039
commit
aa37078570
1 changed files with 7 additions and 13 deletions
|
@ -76,20 +76,14 @@ func syncTrees(ctx context.Context, treeSvc *tree.Service, cnrCli *containerClie
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: #1902 fetch all the trees via a new tree RPC
|
|
||||||
wellKnownTrees := [...]string{"version", "system"}
|
|
||||||
|
|
||||||
for _, id := range ids {
|
for _, id := range ids {
|
||||||
for i := range wellKnownTrees {
|
err = treeSvc.SynchronizeAllTrees(ctx, id)
|
||||||
err = treeSvc.SynchronizeTree(ctx, id, wellKnownTrees[i])
|
if err != nil && !errors.Is(err, tree.ErrNotInContainer) {
|
||||||
if err != nil && !errors.Is(err, tree.ErrNotInContainer) {
|
log.Warn(
|
||||||
log.Warn(
|
"tree synchronization failed",
|
||||||
"tree synchronization failed",
|
zap.Stringer("cid", id),
|
||||||
zap.Stringer("cid", id),
|
zap.Error(err),
|
||||||
zap.String("tree_id", wellKnownTrees[i]),
|
)
|
||||||
zap.Error(err),
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue