-
-
Notifications
You must be signed in to change notification settings - Fork 352
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
Streaming requests shouldn't be idempotent #181
Comments
I commented over on the excon issue (excon/excon#530). In summary, I agree the interface leaves something to be desired in terms of understanding the state of retries, but having excon itself change the idempotent flag based on presence of block seems unexpected and limiting. That said, I suspect a better fix at least in this case would be to disable idempotent on get_object when a block is passed. We could also consider making it an option, as you suggested, but I suspect just turning it off will be easiest and give the best experience. What do you think? |
I think that makes sense. I'm in favor of just turning it off for now and maybe sometime in the future it could become configurable. |
Agreed, so I think we should leave it on for non-streaming and turn off when a block is supplied, right? Would you be up for making a quick pull request with that change? Thanks! |
Here's the pull request: #183 |
Thanks! |
I posted an issue on Excon's github page for this same problem (excon/excon#530), but I think it's important to also post it here as Fog hardcodes the idempotent option to true for a lot of requests and doesn't seem to allow the option to be customized (see, for instance, https://github.com/fog/fog-aws/blob/master/lib/fog/aws/requests/storage/get_object.rb#L55).
The idempotent option can be problematic for streaming requests since Excon automatically retries the entire request from the beginning when something goes wrong, without making it clear that it's doing so. This can easily result in data corruption.
Consider the following example, using Fog, demonstrating this problem
The text was updated successfully, but these errors were encountered: