Closed as not planned
Description
Acknowledgements
- I have searched (https://github.com/aws/aws-sdk/issues?q=is%3Aissue) for past instances of this issue
- I have verified all of my SDK modules are up-to-date (you can perform a bulk update with
go get -u github.com/aws/aws-sdk-go-v2/...
)
Describe the bug
The table waiter won't wait at all when passed waitTime < MinDelay
.
So to get any wait time smaller than the default 20 seconds stablished for MinDelay
the caller is forced to set this MinDelay optional parameter to something smaller than the wanted waitTime:
Expected Behavior
The waiter should wait for waitTime
without having to worry about the MinDelay
optional parameter.
Current Behavior
The waiter performs the check :
if remainingTime < options.MinDelay || remainingTime <= 0 {
break
}
Deciding it doesn't have to wait as if it were in the middle of the computational backoff and returning the error.
Reproduction Steps
ctx := context.Background()
conf, _ := config.LoadDefaultConfig(ctx)
client := dynamodb.NewFromConfig(conf)
waiter := dynamodb.NewTableExistsWaiter(client)
waitTime := 10 * time.Second
err := waiter.Wait(ctx, &dynamodb.DescribeTableInput{
TableName: aws.String("myTable"),
}, waitTime)
Possible Solution
Implement some logic like: "if this is the first wait and remainingTime < minDelay then wait remainingTime"
Additional Information/Context
No response
AWS Go SDK V2 Module Versions Used
github.com/aws/aws-sdk-go-v2/service/dynamodb v1.27.1
Compiler and Version used
go version go1.21.5 darwin/arm64
Operating System and version
MacOS Sonoma
Activity