From 3456c844ecec4636140dfcd6be520e21b3e9f901 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Sun, 9 Jun 2019 09:26:54 +0000 Subject: [PATCH] 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. --- extras/scanner/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extras/scanner/main.go b/extras/scanner/main.go index 89dc7da30..9b38e5bf9 100644 --- a/extras/scanner/main.go +++ b/extras/scanner/main.go @@ -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