-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
Delete by query doesn't work in persistent http connection #5141
Comments
Any news about this issue? Using new connection for every single request doesn't look like a good idea. |
On 0.9.11 you could spot in logs:
And this is after:
where query is different. Clearly requests are messed up. |
it doesn't seem like the delete by query relates to persistent http connections from the client? Maybe the client resets the connections on errors and it simply tries to reconnect and fail all the time? Note that the format of the body of delete by query changed between 0.90. and 1.0, maybe the failure is because of that. |
Judging by your other request, that Alternatively, you could do:
And from 1.0 onwards:
|
@clintongormley it's query string, body is the 6th parameter. Here is output for 1.0.0:
@kimchy there are no errors as you can see. |
@bobrik Sorry yes, I misread. The curl docs say that if you plan on reusing the same connection for a GET after a POST, then you should reset it with CURLOPT_HTTPGET: http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTHTTPGET I wonder if the same thing applies to a DELETE? Perhaps try it? |
I've put tcp proxy in the middle and found out that curl reused body from previous requests if they were not cleared explicitly. Gonna fix that it ruflin/Elastica then. |
@clintongormley Thanks for the input. It's good to learn something new every day ;-) |
This is probably connected with #2665.
Here's test-case in php:
The last query should respond with just one hit, but it returns document that was removed. This works as it should if new connection is made for every request (see function
send
), it also works if I comment search (sic!) request before delete-by-query.I'm sorry for php, I couldn't make it work with curl or nc.
The text was updated successfully, but these errors were encountered: