fix(dynamodb): enforce the aggregate batch write limit (#6633)

This commit is contained in:
Andre Kurait authored and GitHub committed 2026-10-26 19:36:27 -04:00
1 parent c6505c9144
commit 6ff4700a22
4 files changed
+262

No files matched your search

@@ -1878,6 +1878,11 @@ public class DynamoDbService {
}
}
long writeCount = requestItems.values().stream().mapToLong(List::size).sum();
if (writeCount > 25) {
throw new AwsException("ValidationException", "Too many items requested for the BatchWriteItem call", 400);
}
// A store that writes single items saves each one inside its item lock, as PutItem does: a
// pass after the locks are released could read an item, lose the race to a concurrent
// write of the same key, and then save the stale copy over it. A whole-table store is