Skip to content

Commit

Permalink
node/object/put: improve metadata logging
Browse files Browse the repository at this point in the history
Add logs about successful operation. Also, log empty signatures and do not try
to continue sending when there are no signatures.

Signed-off-by: Pavel Karpy <[email protected]>
  • Loading branch information
carpawell committed Dec 23, 2024
1 parent c6c6aea commit 70bd9ea
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pkg/services/object/put/distributed.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@ func (t *distributedTarget) Close() (oid.ID, error) {
t.metaMtx.RLock()
defer t.metaMtx.RUnlock()

if len(t.collectedSignatures) == 0 {
t.placementIterator.log.Info("skip chain meta information subbmit, zero signatures were collected", zap.Stringer("oid", id))
return id, nil
}

var await bool
switch t.metainfoConsistencyAttr {
// TODO: there was no constant in SDK at the code creation moment
Expand All @@ -172,8 +177,11 @@ func (t *distributedTarget) Close() (oid.ID, error) {

err = t.cnrClient.SubmitObjectPut(await, t.objSharedMeta, t.collectedSignatures)
if err != nil {
t.placementIterator.log.Info("failed to submit", zap.Stringer("oid", id), zap.Error(err))
t.placementIterator.log.Info("failed to submit object meta information", zap.Stringer("oid", id), zap.Error(err))
return id, nil
}

t.placementIterator.log.Debug("submitted object meta information", zap.Stringer("oid", id))
}

return id, nil
Expand Down

0 comments on commit 70bd9ea

Please sign in to comment.