Skip to content
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

Ensure DrillSidewaysScorer calls LeafCollector#finish on all sideways-dim FacetsCollectors #12640

Merged
merged 5 commits into from
Nov 14, 2023

Conversation

gsmiller
Copy link
Contributor

@gsmiller gsmiller commented Oct 9, 2023

As DrillSidewaysScorer is currently written, if any leaf collectors throw CollectionTerminatedException then LeafCollector#finish won't properly get called. This patch makes sure we always call #finish.

Comment on lines +149 to +151
// System.out.println("queryFirst: baseScorer=" + baseScorer + " disis.length=" +
// disis.length
// + " bits.length=" + bits.length);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// System.out.println("queryFirst: baseScorer=" + baseScorer + " disis.length=" +
// disis.length
// + " bits.length=" + bits.length);
// System.out.println("queryFirst: baseScorer=" + baseScorer + " disis.length="
// + disis.length + " bits.length=" + bits.length);

@slow-J
Copy link
Contributor

slow-J commented Nov 10, 2023

LGTM, I think that this requires a rebase after https://github.com/apache/lucene/pull/12642/files

Copy link
Member

@mikemccand mikemccand left a comment

Choose a reason for hiding this comment

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

LGTM @gsmiller thanks!

…-dim FacetsCollectors

We need to be defensive against CollectionTerminatedException and make sure we still #finish all collectors.
@gsmiller gsmiller force-pushed the GH/ds-finish-on-early-terminate branch from b8a6cd8 to dcc2403 Compare November 14, 2023 00:13
@gsmiller gsmiller merged commit 117e8d3 into apache:main Nov 14, 2023
4 checks passed
@gsmiller gsmiller deleted the GH/ds-finish-on-early-terminate branch November 14, 2023 00:36
gsmiller added a commit that referenced this pull request Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants