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:
Bryan Boreham
2019-06-09 09:26:54 +00:00
parent 04668590f6
commit 3456c844ec

View File

@@ -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