cmd/satellite: repair-segment; don't stop processing if segment is not found

If we are processing list of segments (csv) we should not stop if one of
segments is not found in DB.

Change-Id: I720f85dc7601c2ca77032e20c1577de55092bd9b
This commit is contained in:
Michal Niewrzal 2022-11-21 17:18:13 +01:00 committed by Storj Robot
parent 9022506292
commit 8e9b7736cc

View File

@ -165,14 +165,14 @@ func cmdRepairSegment(cmd *cobra.Command, args []string) (err error) {
if err != nil {
if metabase.ErrSegmentNotFound.Has(err) {
printOutput(segment.StreamID, segment.Position.Encode(), "segment not found in metabase db", 0, 0)
return nil
}
} else {
log.Error("unknown error when getting segment metadata",
zap.Stringer("stream-id", segment.StreamID),
zap.Uint64("position", segment.Position.Encode()),
zap.Error(err))
printOutput(segment.StreamID, segment.Position.Encode(), "internal", 0, 0)
return nil
}
continue
}
repairSegment(ctx, log, peer, metabaseDB, segment)
}