2020-09-22 06:51:47 +00:00
|
|
|
package searchsvc
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
|
|
|
"github.com/nspcc-dev/neofs-node/pkg/network"
|
2020-12-10 12:26:40 +00:00
|
|
|
"go.uber.org/zap"
|
2020-09-22 06:51:47 +00:00
|
|
|
)
|
|
|
|
|
2020-12-10 12:26:40 +00:00
|
|
|
func (exec *execCtx) processNode(ctx context.Context, addr *network.Address) {
|
|
|
|
log := exec.log.With(zap.Stringer("remote node", addr))
|
2020-09-22 06:51:47 +00:00
|
|
|
|
2020-12-10 12:26:40 +00:00
|
|
|
log.Debug("processing node...")
|
2020-09-22 06:51:47 +00:00
|
|
|
|
2020-12-10 12:26:40 +00:00
|
|
|
client, ok := exec.remoteClient(addr)
|
|
|
|
if !ok {
|
|
|
|
return
|
2020-09-29 16:44:59 +00:00
|
|
|
}
|
|
|
|
|
2020-12-10 12:26:40 +00:00
|
|
|
ids, err := client.searchObjects(exec)
|
2020-09-22 06:51:47 +00:00
|
|
|
|
|
|
|
if err != nil {
|
2020-12-10 12:26:40 +00:00
|
|
|
exec.log.Debug("local operation failed",
|
|
|
|
zap.String("error", err.Error()),
|
|
|
|
)
|
2020-09-22 06:51:47 +00:00
|
|
|
|
2020-12-10 12:26:40 +00:00
|
|
|
return
|
2020-09-22 06:51:47 +00:00
|
|
|
}
|
|
|
|
|
2020-12-10 12:26:40 +00:00
|
|
|
exec.writeIDList(ids)
|
2020-09-22 06:51:47 +00:00
|
|
|
}
|