diff --git a/extras/scanner/main.go b/extras/scanner/main.go index 8ad9a7b5f..be8f528e9 100644 --- a/extras/scanner/main.go +++ b/extras/scanner/main.go @@ -415,7 +415,7 @@ func (sc *scanner) deleteFromDynamoDB(batch []map[string]*dynamodb.AttributeValu } if err != nil { if throttled(err) { - sc.writeLimiter.WaitN(context.Background(), len(batch)) + sc.writeLimiter.WaitN(context.Background(), numToSend) // Back round the loop without taking anything away from the batch continue } else {