-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Bug hitting CrateDB blob store? #3964
Comments
Do you get the same behavior with no cache? |
Thanks for the reply @swankjesse. I didn't setup a cache, so I think the answer is yes I get the same behavior. It may very well be a bug with the crate server, but I can't explain what is causing it. It is troubling to me that once I get a 404, no response from OkHttp is correct. They all return the response from the prior call, if that makes sense. |
Yeah, OkHttp doesn't remember previous responses so it can't do that. Take a look at Crate. |
Thanks. So I turned up logging on crate and ran testCallAfter404 which should be a 200, 404 then 200. Here is what crate logged
The 404 call doesn't log the response or the line "transferFile operationComplete". Does it make sense that the 404 call from crate is never really finished but OkHttp returns a 404 anyway? For comparison, I ran curl against what should be a 200 and then the same 404. Here is the output
With the curl, the 404 logs "Connection reset by peer". The request headers are little different for that call. Really appreciate the help looking at this. |
So, adding a "Connection: close" header to the request solves the issue. https://github.com/mjwall/okhttp-test/blob/master/src/test/java/com/mjwall/OkHttpTest.java#L44 Thanks again. |
Still looks like a Crate bug. |
Filed bug with crate - crate/crate#7185 |
I debated asking this is on stackoverflow since I am not sure it a bug. I created a repo at https://github.com/mjwall/okhttp-test to show what I am seeing. Unfortunately I only see the behavior against a CrateDB blob store, so the https://github.com/mjwall/okhttp-test/blob/master/README.md has instructions for running crate in docker or natively. Running
mvn clean test
with crate started and the blobs inserted will show failing test where I am seeing the issues. Pasting my description of the issue from that README below as well.Can anyone confirm this is a bug or show what I am doing wrong in my usage of the library. Thank you for your time.
The text was updated successfully, but these errors were encountered: