Define DynamoDB Transaction limit (#3093)

Signed-off-by: Bernd Verst <github@bernd.dev>
This commit is contained in:
Bernd Verst 2023-08-21 15:52:30 -07:00 committed by GitHub
parent a8aa194329
commit 824ccebe87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -338,6 +338,12 @@ func (d *StateStore) parseTTL(req *state.SetRequest) (*int64, error) {
return nil, nil
}
// MultiMaxSize returns the maximum number of operations allowed in a transaction.
// For AWS DynamoDB, that's 100.
func (d *StateStore) MultiMaxSize() int {
return 100
}
// Multi performs a transactional operation. succeeds only if all operations succeed, and fails if one or more operations fail.
func (d *StateStore) Multi(ctx context.Context, request *state.TransactionalStateRequest) error {
opns := len(request.Operations)