Increment attemptCount when a LimitExceededException occurs
This commit is contained in:
parent
7718cd194c
commit
fd98cae9cc
|
@ -269,8 +269,9 @@ func resourceAwsDynamoDbTableCreate(d *schema.ResourceData, meta interface{}) er
|
||||||
time.Sleep(DYNAMODB_THROTTLE_SLEEP)
|
time.Sleep(DYNAMODB_THROTTLE_SLEEP)
|
||||||
attemptCount += 1
|
attemptCount += 1
|
||||||
} else if awsErr.Code() == "LimitExceededException" {
|
} else if awsErr.Code() == "LimitExceededException" {
|
||||||
log.Printf("[DEBUG] Limit on creation hit, sleeping for a bit")
|
log.Printf("[DEBUG] Limit on concurrent table creations hit, sleeping for a bit")
|
||||||
time.Sleep(DYNAMODB_LIMIT_EXCEEDED_SLEEP)
|
time.Sleep(DYNAMODB_LIMIT_EXCEEDED_SLEEP)
|
||||||
|
attemptCount += 1
|
||||||
} else {
|
} else {
|
||||||
// Some other non-retryable exception occurred
|
// Some other non-retryable exception occurred
|
||||||
return fmt.Errorf("AWS Error creating DynamoDB table: %s", err)
|
return fmt.Errorf("AWS Error creating DynamoDB table: %s", err)
|
||||||
|
|
Loading…
Reference in New Issue