Skip to content

Fix PercolatorQuerySearchIT#testPercolatorQueryExistingDocument test #54931

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

Merged
merged 1 commit into from
Apr 8, 2020

Conversation

talevy
Copy link
Contributor

@talevy talevy commented Apr 7, 2020

The PercolatorQuerySearchIT tests do not support SMILE since
it cannot create valid UTF-8 which the Percolator queries want.

This failed on my backport PR, guess it was missed:
https://gradle-enterprise.elastic.co/s/otxkawsvp66ze

Should fix this test failure.

The PercolatorQuerySearchIT tests do not support SMILE since
it cannot create valid UTF-8 which the Percolator queries want.
@talevy talevy added >test Issues or PRs that are addressing/adding tests :Search Relevance/Percolator Reverse search: find queries that match a document v8.0.0 labels Apr 7, 2020
@talevy talevy requested a review from martijnvg April 7, 2020 22:31
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (:Search/Percolator)

Copy link
Contributor

@romseygeek romseygeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Do we know why this has suddenly started failing?

@martijnvg
Copy link
Member

Does this problem only occur when percolating an existing document?
If so then I wonder whether this is a real bug.

When documents are provided as part of the percolate query then the docs get copied and parsed as json (see PercolateQueryBuilder#parseDocument(...) method). However the document to percolate is fetched from a get response (see PercolateQueryBuilder#doRewrite(...)) and if the _source is stored as smile then this could cause the assertion error in PercolateQuery#toString(). I think we should also reparse the document to be percolated as json when percolating an existing document?

@talevy
Copy link
Contributor Author

talevy commented Apr 8, 2020

failed on master here: https://gradle-enterprise.elastic.co/s/ck7zbtbf7tceu/tests/vmlk5cn6cneke-ftftgx32uquuu.

I think we should also reparse the document to be percolated as json when percolating an existing document?

It does seem like that would solve the problem. I'm going to go ahead and merge this so fewer CI runs fail for now!

@talevy talevy merged commit aac7e1b into elastic:master Apr 8, 2020
@talevy talevy deleted the fixperc branch April 8, 2020 14:42
@talevy
Copy link
Contributor Author

talevy commented Apr 8, 2020

@romseygeek thanks for the review! This issue in PercolateQueries always existed, but it never showed up because of a quirk in our testing infrastructure that would create an external ES Cluster in Gradle for testing, and that cluster never had any coordinating nodes (if I remember correctly). For other reasons, I "fixed" this external cluster quirk and forced it to create an internal test cluster. These internal test clusters have more diverse topologies/configurations that bubble up this bug that document sources stored in SMILE break in toString since they do not support UTF-8 well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Search Relevance/Percolator Reverse search: find queries that match a document >test Issues or PRs that are addressing/adding tests v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants