Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
  • Loading branch information
danie1sullivan and mloiseleur authored Nov 9, 2023
1 parent 4a8dbc5 commit b83935b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions registry/dynamodb.go
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,7 @@ func (im *DynamoDBRegistry) appendDelete(statements []*dynamodb.BatchStatementRe
func (im *DynamoDBRegistry) executeStatements(ctx context.Context, statements []*dynamodb.BatchStatementRequest, handleErr func(request *dynamodb.BatchStatementRequest, response *dynamodb.BatchStatementResponse) error) error {
for len(statements) > 0 {
var chunk []*dynamodb.BatchStatementRequest
// DynamoDB allows a maximum batch size of 25 items.
if len(statements) > 25 {
chunk = statements[:25]
statements = statements[25:]
Expand Down
2 changes: 1 addition & 1 deletion registry/dynamodb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ func TestDynamoDBRegistryApplyChanges(t *testing.T) {
},
},
{
name: "create many",
name: "create more entries than DynamoDB batch size limit (25)",
changes: plan.Changes{
Create: []*endpoint.Endpoint{
{
Expand Down

0 comments on commit b83935b

Please sign in to comment.