-
Notifications
You must be signed in to change notification settings - Fork 1.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
[BUG] CompletionSuggestSearchIT.testSkipDuplicates is flaky #8963
Conversation
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
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.
Gradle Check (Jenkins) Run Completed with:
|
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.
d0h.. something was bothering me a bit about this and I forgot about a Lucene deprecation made in 9.7. I updated my review. The fix is a smaller one liner but we'll want to update the rest of the codebase w/ that deprecation change as well.
@@ -108,15 +109,21 @@ private static void suggest(IndexSearcher searcher, CompletionQuery query, TopSu | |||
for (LeafReaderContext context : searcher.getIndexReader().leaves()) { | |||
BulkScorer scorer = weight.bulkScorer(context); | |||
if (scorer != null) { | |||
LeafCollector leafCollector = null; |
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.
I just realized this fix is simpler.
Per this Query#rewrite deprecation just change line 106 to the following
query = (CompletionQuery) query.rewrite(searcher);
You're basically reimplementing here the finish hook that was added in Lucene PR#12380.
That logic path wasn't being executed though because we're using the old collector API through the creation of a new searcher wrapping the reader.
I forgot about this deprecation in the 9.7 upgrade and it wasn't exposed because #12380 wasn't merged until after 9.7.
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.
Sorry about it, merged just before, there is another issue I run into, again with Suggester but slightly different cause:
java.lang.IllegalArgumentException: onlrtdbizi is not a SuggestField
at org.apache.lucene.search.suggest.document.CompletionWeight.bulkScorer(CompletionWeight.java:80)
at org.opensearch.search.suggest.completion.CompletionSuggester.suggest(CompletionSuggester.java:110)
at org.opensearch.search.suggest.completion.CompletionSuggester.innerExecute(CompletionSuggester.java:78)
at org.opensearch.search.suggest.completion.CompletionSuggester.innerExecute(CompletionSuggester.java:1)
I could incorporate your suggestion into the upcoming fix (still trying to figure out what is happening)
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.
I'm finishing a PR that cuts over all rewrites to the non-deprecated one. It includes this change in the CompletionSuggester and other places.
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.
I opened the PR but I left your patch in. I was wrong, there's still an issue and cutting over to invoke the hook doesn't solve the occasional failure. Let me know if that's what you're investigating.
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.
I opened the PR but I left your patch in. I was wrong, there's still an issue and cutting over to invoke the hook doesn't solve the occasional failure.
Do you have a sample stack trace or logs by any chance?
Let me know if that's what you're investigating.
The one that caused another batch of flakyness: #8968
d0h.. 2 minutes too late :) I'll open a follow up PR to refactor all of the calls to the deprecated method. |
…ch-project#8963) Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
…ch-project#8963) Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
…ch-project#8963) Signed-off-by: Andriy Redko <andriy.redko@aiven.io> Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
…ch-project#8963) Signed-off-by: Andriy Redko <andriy.redko@aiven.io> Signed-off-by: Ivan Brusic <ivan.brusic@flocksafety.com>
@andrross totally, I missed that once we moved |
Signed-off-by: Andriy Redko <andriy.redko@aiven.io> (cherry picked from commit 106e83a) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…ch-project#8963) Signed-off-by: Andriy Redko <andriy.redko@aiven.io> Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Description
CompletionSuggestSearchIT.testSkipDuplicates is Flaky, caused by #8668
Related Issues
Resolves #8932
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.