-
Notifications
You must be signed in to change notification settings - Fork 145
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
Google Storage XML head_object doesn't pass idempotent flag #416
Comments
This was referenced May 5, 2019
@Temikus Hi! What do you think about this? Would love to see this working. |
Temikus
added a commit
to Temikus/fog-google
that referenced
this issue
Jun 27, 2020
To bring it into conformance with the rest of the methods, e.g. GET, PUT, DELETE Fixes fog#416
@RigoTheDev I've staged the change in: #498 Can you or @simonschellaert check if it resolves your issue? Just |
@Temikus Seems to be working! Thank you! |
@RigoTheDev Sweet. Thanks! I'll merge shortly. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm developing an application where we make heavy use of the Fog Google Storage XML API (fog-google 1.7.1). In particular, we are issuing HEAD requests for thousands of objects. While running this application, I'm seeing intermittent
Excon::Error::Socket: end of file reached (EOFError)
errors.I was able to reproduce this issue in my Rails console as follows:
Issue a HEAD request as follows:
connection.head_object(bucket_name, file_name)
. This request should succeed.Wait ten minutes or longer. (A shorter interval may also work but I didn't test that.)
Issue the same HEAD request again:
connection.head_object(bucket_name, file_name)
.I now receive the aforementioned
Excon::Error::Socket: end of file reached (EOFError)
.I was able to resolve the issue by passing the option
persistent: false
when creating the connection. While analyzing the code of fog-google, I noticed that the option:idempotent => true
is not passed inhead_object
, while that option is passed inget_object
,put_object
anddelete_object
(see below). Since that option effectively signals that Excon may retrieve the request (if the connection timed out for example), I'm guessing that might be the cause of the failures I'm seeing. I personally see no reason whyhead_object
shouldn't be idempotent, so I think this flag could safely be added. Is this correct? Thanks in advance for the feedback.fog-google/lib/fog/storage/google_xml/requests/get_object.rb
Line 47 in 6ca3d33
fog-google/lib/fog/storage/google_xml/requests/put_object.rb
Line 32 in 6ca3d33
fog-google/lib/fog/storage/google_xml/requests/delete_object.rb
Line 18 in 6ca3d33
The text was updated successfully, but these errors were encountered: