lucene icon indicating copy to clipboard operation
lucene copied to clipboard

LUCENE-10001: Make CollectionTerminatedException handling in MultiCollector configurable

Open gsmiller opened this issue 3 years ago • 2 comments

Description

There could be use-cases where a user wants to terminate all wrapped collectors in a MultiCollector when one terminates. Today, other collectors continue collecting. For example, a user collecting matching docs while also collecting into a FacetsCollector may want to terminate both collectors when the "main" matching docs collector terminates.

#11040

Solution

Added the ability to configure the behavior through an enum specified to wrap

Tests

Updated the existing tests to check behavior under both options.

Checklist

Please review the following and check all that apply:

  • [x] I have reviewed the guidelines for How to Contribute and my code conforms to the standards described there to the best of my ability.
  • [x] I have created a Jira issue and added the issue ID to my pull request title.
  • [x] I have given Lucene maintainers access to contribute to my PR branch. (optional but recommended)
  • [x] I have developed this patch against the main branch.
  • [x] I have run ./gradlew check.
  • [x] I have added tests for my changes.

gsmiller avatar Jun 13 '21 15:06 gsmiller

@gautamworah96 thanks for the feedback! Adrien and I have been having some conversation around whether-or-not this change makes sense over in the Jira issue. As a result, I'm going to try out a little bit of a different approach next, but I appreciate your comments here and will work them in as possible in my next revision. Thanks again!

gsmiller avatar Jun 15 '21 22:06 gsmiller

I've put this in "Draft" state for now after a suggestion over on the Jira issue to approach this differently. I'll update here (and take out of "Draft") once I've had a chance to explore a different approach. Thanks everyone for the comments so far!

gsmiller avatar Jun 28 '21 22:06 gsmiller

@gsmiller what should we do with this PR? Are you working on the alternative (wrapping?) approach? Should we close this PR and later open that approach? Or leave this one open...? Thanks.

mikemccand avatar Nov 02 '23 11:11 mikemccand

@mikemccand I'm going to close this out. I haven't worked on this in a while now. Thanks for the ping!

gsmiller avatar Nov 06 '23 20:11 gsmiller