satellite/orders: avoid logging "bucketName or projectID not set"

When we switched to segments loop we stopped
adding bucket name and project ID to order limit
metadata. This is causing lots of logging that we don't need.

Change-Id: Id3f878a170b7a6b801e8a838ee69165715985d60
This commit is contained in:
Michał Niewrzał 2021-12-10 11:10:00 +01:00 committed by Clement Sam
parent 9615bd191f
commit 911540e76e

View File

@ -315,7 +315,13 @@ func (endpoint *Endpoint) SettlementWithWindowFinal(stream pb.DRPCOrders_Settlem
continue
}
if bucketInfo.BucketName == "" || bucketInfo.ProjectID.IsZero() {
satelliteAction := orderLimit.Action == pb.PieceAction_GET_AUDIT ||
orderLimit.Action == pb.PieceAction_GET_REPAIR ||
orderLimit.Action == pb.PieceAction_PUT_REPAIR
// log error only for orders created by users, for satellite actions order limits are created
// without bucket name and project ID because segments loop doesn't have access to it
if !satelliteAction && (bucketInfo.BucketName == "" || bucketInfo.ProjectID.IsZero()) {
log.Info("decrypt order: bucketName or projectID not set",
zap.String("bucketName", bucketInfo.BucketName),
zap.String("projectID", bucketInfo.ProjectID.String()),