-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
Fix simple query string serialization conditional #38960
Conversation
Looks like elastic#21504 introduced a serialization conditional for lenientSet, but the PR was never backported to 5.x hence whenever simple query string is serialized between 6.x and 5.6, it can't be read/written properly causing errors on the transport layer. This commit updates the conditional to only read/write the field against 6.0+ versions which are aware of it. Closes elastic#38889
Pinging @elastic/es-search |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ouch, thanks @javanna . I left one comment for a follow up to ensure that we have bwc tests for this query.
} | ||
} | ||
|
||
public void testReadFrom_5_6() throws IOException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add a simple rest test for the simple_query_string
as a follow up in master. This would have caught this bug if we had one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right, this unit test would have failed if we had it, but it only catches the bug when reading on 6.7 something that was written on 5.6. The other way around is much harder to test in 6.x cause we don't really have the reading code from 5.6.
Looks like #21504 introduced a serialization conditional for lenientSet, but the PR was never backported to 5.x hence whenever simple query string is serialized between 6.x and 5.6, it can't be read/written properly causing errors on the transport layer. This commit updates the conditional to only read/write the field against 6.0+ versions which are aware of it. Closes #38889
Looks like #21504 introduced a serialization conditional for lenientSet,
but the PR was never backported to 5.x hence whenever simple query
string is serialized between 6.x and 5.6, it can't be read/written properly causing errors on the transport layer.
This commit updates the conditional to only read/write the field against
6.0+ versions which are aware of it.
Closes #38889