-
-
Notifications
You must be signed in to change notification settings - Fork 351
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
Fog::AWS::Storage don't retry client errors #691
Conversation
Across fog-aws we have the pattern
That generally makes sense; if connection options aren't set, ensure we pass an empty hash to Excon. For the custom retry settings that have been applied only to |
I hope I covered it relatively clearly in the other issues, but just in case I'll briefly say that the idea (if I recall) was to make it easier to deal with the eventually consistent nature of AWS. ie if you create an object and then want to address it, you'd like that to just work even if it takes a little bit longer. That said, cases like what you point out show how that was inadvertently applied much too broadly and by seeking to make that case easier it introduces a lot of lag for other use cases. I'm not yet sure what the best approach or solution really is, but tried to leave some ideas and ask some questions across the issues, so I hope we'll be able to talk through them and figure something out. That being said, I'd like to chat a bit more before proceeding with this or similar patches to make sure we've considered the options and impacts thoroughly. Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After our discussions, I believe this should fix issues that some folks were having and not negatively impact the eventual consistency things it was originally set out to address (as AWS seems to have fixed that on their side of things).
@rahim did you need a release with this? |
Thank you very much for looking into this issue and thank you for your swift responses! I’m not the author of this PR, but I think this issue reported in carrierwave seems related |
@rajyan Thanks, I hadn't seen that issue, though I'm not certain it will totally fix it either (it should hopefully at least help). Released in v3.21.0. |
Resolves #690
Excon's default configuration retries HTTP 4xx class errors, which we generally can't expect to be resolved by retry. Combined with relatively recent retry config added in #674 we were seeing S3 calls to non-existent objects take multiple seconds when made via fog-aws.
See the issue for detailed explanation of the underlying cause.
Though this resolves the problem, I question whether it's the right approach:
Fog::AWS::Storage
are different to all the other services covered by fog-aws.we create something of a foot gun, because someone who chooses to just configure eg(addressed in later commit)retry_limit
(or any other arbitrary connection option) will inadvertently setretry_errors
back to Excon's default.