Skip to content

Commit 6f3ff4a

Browse files
authored
object/put: log meta errors instead of erroring out (#3029)
2 parents f90a3d3 + f3b12fd commit 6f3ff4a

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

pkg/services/object/put/distributed.go

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import (
1313
"github.com/nspcc-dev/neofs-node/pkg/network"
1414
svcutil "github.com/nspcc-dev/neofs-node/pkg/services/object/util"
1515
"github.com/nspcc-dev/neofs-node/pkg/util"
16-
apistatus "github.com/nspcc-dev/neofs-sdk-go/client/status"
1716
neofscrypto "github.com/nspcc-dev/neofs-sdk-go/crypto"
1817
"github.com/nspcc-dev/neofs-sdk-go/netmap"
1918
objectSDK "github.com/nspcc-dev/neofs-sdk-go/object"
@@ -165,17 +164,22 @@ func (t *distributedTarget) sendObject(node nodeDesc) error {
165164
}
166165

167166
if t.localNodeInContainer && !node.local {
167+
// These should technically be errors, but we don't have
168+
// a complete implementation now, so errors are substituted with logs.
169+
var l = t.placementIterator.log.With(zap.Stringer("oid", t.obj.GetID()))
170+
168171
if sig == nil {
169-
return fmt.Errorf("%w: missing object meta signature", apistatus.ErrSignatureVerification)
172+
l.Info("missing object meta signature")
173+
return nil
170174
}
171175

172176
if !bytes.Equal(sig.PublicKeyBytes(), node.info.PublicKey()) {
173-
return fmt.Errorf("%w: public key differs in object meta signature", apistatus.ErrSignatureVerification)
177+
l.Info("public key differs in object meta signature")
178+
return nil
174179
}
175180

176181
if !sig.Verify(t.objSharedMeta) {
177-
return fmt.Errorf("%w: %s node did not pass the meta information verification",
178-
apistatus.ErrSignatureVerification, network.StringifyGroup(node.info.AddressGroup()))
182+
l.Info("meta signature verification failed", zap.String("node", network.StringifyGroup(node.info.AddressGroup())))
179183
}
180184
}
181185

0 commit comments

Comments
 (0)