satellte/metainfo: Avoid a noisy warning

DeleteObjectPieces must not call overlay cache KnownReliable method with
an empty list of node IDs for avoiding to log a useless noisy warning.

Change-Id: Ibe2a34f2913f003d3ba020f9764c1369fa63123b
This commit is contained in:
Ivan Fraixedes 2020-01-07 14:15:04 +01:00
parent e232042e85
commit 027e3d4f62
No known key found for this signature in database
GPG Key ID: 042B474597F96DB7

View File

@ -2363,6 +2363,11 @@ func (endpoint *Endpoint) DeleteObjectPieces(
} }
} }
if len(nodeIDs) == 0 {
// Pieces will be collected by garbage collector
return
}
nodes, err := endpoint.overlay.KnownReliable(ctx, nodeIDs) nodes, err := endpoint.overlay.KnownReliable(ctx, nodeIDs)
if err != nil { if err != nil {
endpoint.log.Warn("unable to look up nodes from overlay", endpoint.log.Warn("unable to look up nodes from overlay",