mirror of
https://github.com/weaveworks/scope.git
synced 2026-04-05 10:17:01 +00:00
Don't run delete batches in parallel
Now we are handling multiple org-hour records in parallel, it's best no to have additional parallelism at the delete level where they may collide on hash key.
This commit is contained in:
@@ -261,7 +261,7 @@ func (sc *scanner) deleteOneOrgHour(ctx context.Context, org string, hour int) i
|
||||
end = len(keys)
|
||||
}
|
||||
wait.Add(1)
|
||||
go func(batchKeys []map[string]*dynamodb.AttributeValue) {
|
||||
func(batchKeys []map[string]*dynamodb.AttributeValue) {
|
||||
sc.deleteFromS3(ctx, batchKeys)
|
||||
for _, key := range batchKeys {
|
||||
delete(key, reportField) // not part of key in dynamoDB
|
||||
|
||||
Reference in New Issue
Block a user