-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Fixing exists query REST tests for sparse_vector_fields #100030
Conversation
Pinging @elastic/es-search (Team:Search) |
- do: | ||
catch: /\[sparse_vector\] fields do not support \[exists\] queries/ | ||
search: | ||
rest_total_hits_as_int: true | ||
index: test | ||
body: | ||
query: | ||
exists: | ||
field: ml.tokens |
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 shouldn't remove this. Behavior for 8.0.0-8.11.0 should not be changed.
Additionally, the test says ""Sparse vector in 7.x": and now you are restricting it to never be 7.x. That seems weird.
Please adjust the test so that it only tests 7.x & add one for [8.0.0-8.11.0) that includes the exists clause failure
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.
This was more of a retraction commit tbh, removing a test from the 7.x section introduced in the original PR for exists queries in sparse vectors for 8.11.
I was trying to limit the effect of the mixed node cluster setup just in the tests and try to account for the different scenarios under separate requests, experimenting also with the node_selector
- but couldn't find any similar cases w/o any modifications to the codebase as well. I also tried limiting the nodes & setting num_replicas=0
when creating the index for the 7.x scenario, however this would pretty much defeat the purpose of any cluster/bcw test altogether. The issue with the node selector, AFAICT, was that when running the test we might end up with a replica placed on a recently upgraded 8.11 index, which later caused all searches that landed on that node to fail, as the index version was less than the expected one for the mixed cluster, raising the exception, even when we had explicitly defined the node_selector
for the search request.
Ended up slightly updating the codebase as well, to return a deprecation warning along with the headers, and treat incoming 7.x exists
queries for sparse_vector
fields as unmatchable ones on >= 8.11 (i.e. return a MatchNoDocsQuery
instead). Happy to remove the deprecation & fallback to raising IllegalArgumentException
in all cases, but would need some help in adjusting it with the existing restapi-test params, as I'm not familiar with the setup & alternatively, I had to do some refactoring on the tests to make it pass consistently. 🤔
I also added an explicit case for [8.0, 8.11) versions though - expecting such requests to fail in all cases - which should be fine as the behaviour will be consistent for the mixed-cluster test suite.
…a deprecation warning for 7.x versions
@elasticsearchmachine test this please |
@elasticmachine update branch |
@elasticmachine update branch |
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.
Let's run the fully bwc-suite to make sure. But this looks good.
@elasticmachine update branch |
@elasticmachine run elasticsearch-ci/part-2 |
At least one of the BWC failures is a "version bump" failure:
The others seem like timeouts unrelated to this change:
So we will need to update this branch as those things are fixed so we can get a green build. |
Thanks @benwtrent for taking a look at it! Will update and hopefully avoid the timeouts in the next run :) |
@elasticmachine update branch |
@elasticmachine run elasticsearch-ci/full-bwc |
@elasticmachine update branch |
@elasticmachine update branch |
More randomly occurring errors related to |
@elasticmachine run elasticsearch-ci/full-bwc |
@elasticmachine update branch |
@elasticmachine run elasticsearch-ci/full-bwc |
Looking at the failures in full-bwc, none are due to this change. Importantly, bwc tests pass with 7.latest, 8.something_not_10_or_11, 8.10, 8.11. Lets merge it. |
Removing (incorrectly) expected exceptions for `exists` queries `sparse_vectors` in < 8.0.0 versions. Closes elastic#100003
💚 Backport successful
|
Removing (incorrectly) expected exceptions for
exists
queriessparse_vectors
in < 8.0.0 versions.Closes #100003