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,22 +76,16 @@ func syncTrees(ctx context.Context, treeSvc *tree.Service, cnrCli *containerClie
|
|||
return
|
||||
}
|
||||
|
||||
// TODO: #1902 fetch all the trees via a new tree RPC
|
||||
wellKnownTrees := [...]string{"version", "system"}
|
||||
|
||||
for _, id := range ids {
|
||||
for i := range wellKnownTrees {
|
||||
err = treeSvc.SynchronizeTree(ctx, id, wellKnownTrees[i])
|
||||
err = treeSvc.SynchronizeAllTrees(ctx, id)
|
||||
if err != nil && !errors.Is(err, tree.ErrNotInContainer) {
|
||||
log.Warn(
|
||||
"tree synchronization failed",
|
||||
zap.Stringer("cid", id),
|
||||
zap.String("tree_id", wellKnownTrees[i]),
|
||||
zap.Error(err),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
log.Info("trees have been synchronized")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue