mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-08-06 01:26:59 +02:00
Apply suggestions from code review
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
This commit is contained in:
parent
4a8dbc5a6b
commit
b83935bb73
@ -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:]
|
||||
|
@ -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{
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user