mirror of
https://github.com/floci-io/floci.git
synced 2026-11-27 07:39:24 -05:00
fix(dynamodb): enforce the aggregate batch write limit (#6633)
This commit is contained in:
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
|
||||
|
||||
Reference in new issue
Block a user