-
Notifications
You must be signed in to change notification settings - Fork 871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Credential expired during retry #3408
Comments
Hello @f400810-freddiemac , Thank you very much for your submission. Best, Yasmine |
Hi @yasminetalby, We are using Basically, build the where build and Thanks |
Hello @f400810-freddiemac , Thank you very much for providing this information. Thank you very much for your feedback and submission! Sincerely, Yasmine |
to confirm them:
#2 I can cope with as the s3a connector has effectively given up on aws retries with the v2 move, too problematic as it retries on things like UnknownHostExceptions. But our own error handling needs to know what sdk failures are recoverable, and we assume that 400 isn't. Is there a specific, stable errorDetail we could use for this? |
Describe the bug
In RetryableStage execute method, the "AwsCredentails" does not attempt to renew if it has expired. Therefore, if a method called with the existing credential is expiring soon, the number of retry is less than intended due to the expiration of the credential.
Expected Behavior
For retry with EqualJitterBackoffStrategy, expect an expired credential will be renew during retry.
Current Behavior
If a request (in our case S3Client.getObject) failed with s retryable Exception and the credential expired between two retry, we got a S3Exception before the retry limit reached.
Reproduction Steps
To consistently reproduce the issue, we create our own implementation of ResponseTransformer that always throw RetryableException. And setup retry policy that will retry pass the credential expired (In our case, the credential has an hour of life. So we setup retry policy go over an hour). Then we call S3Client.getObject with our ResponseTransformer implementation. In stead of failed with reaching the retry limit, we got the S3Exception with the provided token has expired.
Possible Solution
For every retry, the request may call AwsCredentialsProvider resolveCredentails to ensure the freshness of the credential
Additional Information/Context
No response
AWS Java SDK version used
2.16.104
JDK version used
1.8.0_181
Operating System and version
Redhat 7.9
The text was updated successfully, but these errors were encountered: