[#1689] Remove deprecated NodeInfo.IterateNetworkEndpoints()
All checks were successful
Vulncheck / Vulncheck (push) Successful in 1m25s
Build / Build Components (push) Successful in 1m48s
Pre-commit hooks / Pre-commit (push) Successful in 1m56s
Tests and linters / Run gofumpt (push) Successful in 3m48s
Tests and linters / Lint (push) Successful in 4m14s
Tests and linters / Staticcheck (push) Successful in 4m10s
Tests and linters / gopls check (push) Successful in 4m23s
Tests and linters / Tests (push) Successful in 4m33s
OCI image / Build container images (push) Successful in 5m3s
Tests and linters / Tests with -race (push) Successful in 5m20s
All checks were successful
Vulncheck / Vulncheck (push) Successful in 1m25s
Build / Build Components (push) Successful in 1m48s
Pre-commit hooks / Pre-commit (push) Successful in 1m56s
Tests and linters / Run gofumpt (push) Successful in 3m48s
Tests and linters / Lint (push) Successful in 4m14s
Tests and linters / Staticcheck (push) Successful in 4m10s
Tests and linters / gopls check (push) Successful in 4m23s
Tests and linters / Tests (push) Successful in 4m33s
OCI image / Build container images (push) Successful in 5m3s
Tests and linters / Tests with -race (push) Successful in 5m20s
Change-Id: Ic78f18aed11fab34ee3147ceea657296b89fe60c Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
56d09a9957
commit
bf06c4fb4b
11 changed files with 83 additions and 82 deletions
|
@ -297,27 +297,27 @@ func (s *Service) synchronizeTree(ctx context.Context, cid cid.ID, from uint64,
|
|||
for i, n := range nodes {
|
||||
errGroup.Go(func() error {
|
||||
var nodeSynced bool
|
||||
n.IterateNetworkEndpoints(func(addr string) bool {
|
||||
for addr := range n.NetworkEndpoints() {
|
||||
var a network.Address
|
||||
if err := a.FromString(addr); err != nil {
|
||||
s.log.Warn(ctx, logs.TreeFailedToParseAddressForTreeSynchronization, zap.Error(err), zap.String("address", addr))
|
||||
return false
|
||||
continue
|
||||
}
|
||||
|
||||
cc, err := createConnection(a, grpc.WithContextDialer(s.ds.GrpcContextDialer()))
|
||||
if err != nil {
|
||||
s.log.Warn(ctx, logs.TreeFailedToConnectForTreeSynchronization, zap.Error(err), zap.String("address", addr))
|
||||
return false
|
||||
continue
|
||||
}
|
||||
defer cc.Close()
|
||||
|
||||
err = s.startStream(egCtx, cid, treeID, from, cc, nodeOperationStreams[i])
|
||||
if err != nil {
|
||||
s.log.Warn(ctx, logs.TreeFailedToRunTreeSynchronizationForSpecificNode, zap.Error(err), zap.String("address", addr))
|
||||
}
|
||||
nodeSynced = err == nil
|
||||
return true
|
||||
})
|
||||
_ = cc.Close()
|
||||
break
|
||||
}
|
||||
close(nodeOperationStreams[i])
|
||||
if !nodeSynced {
|
||||
allNodesSynced.Store(false)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue