-
Notifications
You must be signed in to change notification settings - Fork 25.2k
ES 6.8.1/7.2.0 varying responses on /<index>/_analyze request in a two node cluster #44078
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
Comments
Pinging @elastic/es-search |
I can also reproduce the behaviour on 7.2.0 with two local nodes. Will focus on that version first and see if we can reproduce in an integration test. |
The problem is still present on master as well, it is caused by the way we serialize and deserialize the analyzed token lists on the transport layer. We allow token lists to be |
Currently we loose information about whether a token list in an AnalyzeAction response is null or an empty list, because we write a 0 value to the stream in both cases and deserialize to a null value on the receiving side. This change fixes this so we write an additional flag indicating whether the value is null or not, followed by the size of the list and its content. Closes elastic#44078
Currently we loose information about whether a token list in an AnalyzeAction response is null or an empty list, because we write a 0 value to the stream in both cases and deserialize to a null value on the receiving side. This change fixes this so we write an additional flag indicating whether the value is null or not, followed by the size of the list and its content. Closes #44078
Currently we loose information about whether a token list in an AnalyzeAction response is null or an empty list, because we write a 0 value to the stream in both cases and deserialize to a null value on the receiving side. This change fixes this so we write an additional flag indicating whether the value is null or not, followed by the size of the list and its content. Closes #44078
Currently we loose information about whether a token list in an AnalyzeAction response is null or an empty list, because we write a 0 value to the stream in both cases and deserialize to a null value on the receiving side. This change fixes this so we write an additional flag indicating whether the value is null or not, followed by the size of the list and its content. Closes #44078
The serialization root cause of this is fixed in 7.3 and upcoming branches by #44284 but backporting the serialization protocol change to 6.8 isn't straight forward because we already released other 7.x versions that would not follow the fixed protocol. I'm looking into maybe patching the different outputs by some changes to the x-content rendering on 6.8. |
Currently we loose information about whether a token list in an AnalyzeAction response is null or an empty list, because we write a 0 value to the stream in both cases and deserialize to a null value on the receiving side. This was fixed in elastic#44284 by a change in the serialization protocol starting in 7.3. However this PR fixes the symptoms without changing the wire protocol which we cannot to easily on 6.8 because we already released incompatible versions in the 7.x line. This change adds special handling on xcontent output and if getToken() is callled on either AnalyzeResponse or DetailedAnalyzeResponse to always return empty lists instead of null values. Relates to elastic#44078
Currently we loose information about whether a token list in an AnalyzeAction response is null or an empty list, because we write a 0 value to the stream in both cases and deserialize to a null value on the receiving side. This was fixed in #44284 by a change in the serialization protocol starting in 7.3. However this PR fixes the symptoms without changing the wire protocol which we cannot to easily on 6.8 because we already released incompatible versions in the 7.x line. This change adds special handling on xcontent output and if getToken() is callled on either AnalyzeResponse or DetailedAnalyzeResponse to always return empty lists instead of null values. Relates to #44078
Also fixed on the 6.8 branch with #44342, so if we release a 6.8.2 it should be fixed there. |
Windows 10, JRE version 1.8.0_201
node.max_local_storage_nodes: 2
elasticsearch.bat
in two separate powershell windowsPUT /foo
Request:
GET /foo/_analyze { "text": "." }
Response:
{ "tokens": [] }
alternates with empty response{}
Request against index with
explain
option:GET /foo/_analyze { "text": ".", "explain": true }
Normal response
alternates with error response
Logs of error response:
Request against empty
foo
index:GET /foo/_analyze { "text": "." }
Response:
{ "tokens": [] }
alternates with{}
But request with
explain
option always returns normal response.The text was updated successfully, but these errors were encountered: