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

Handle errors in combine operator #9689

Merged
merged 2 commits into from
Oct 31, 2022

Conversation

Jackie-Jiang
Copy link
Contributor

With the current combine algorithm, the errors must also be handled, or the query will either timeout or throw unexpected exception.

@codecov-commenter
Copy link

codecov-commenter commented Oct 29, 2022

Codecov Report

Merging #9689 (63c5df6) into master (91fa86b) will increase coverage by 41.90%.
The diff coverage is 91.66%.

@@              Coverage Diff              @@
##             master    #9689       +/-   ##
=============================================
+ Coverage     28.13%   70.03%   +41.90%     
- Complexity       53     4932     +4879     
=============================================
  Files          1936     1948       +12     
  Lines        103927   104282      +355     
  Branches      15770    15809       +39     
=============================================
+ Hits          29235    73032    +43797     
+ Misses        71832    26129    -45703     
- Partials       2860     5121     +2261     
Flag Coverage Δ
integration1 25.34% <75.00%> (-0.07%) ⬇️
integration2 24.79% <41.66%> (+0.10%) ⬆️
unittests1 67.45% <91.66%> (?)
unittests2 15.75% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
.../core/operator/combine/GroupByCombineOperator.java 82.82% <0.00%> (+14.14%) ⬆️
.../apache/pinot/common/exception/QueryException.java 94.44% <100.00%> (+1.11%) ⬆️
...operator/blocks/results/ExceptionResultsBlock.java 75.00% <100.00%> (ø)
...not/core/operator/combine/BaseCombineOperator.java 86.90% <100.00%> (+7.63%) ⬆️
...ache/pinot/common/metadata/ZKMetadataProvider.java 66.85% <0.00%> (-0.56%) ⬇️
...pache/pinot/core/query/utils/idset/EmptyIdSet.java 25.00% <0.00%> (ø)
...anager/realtime/SegmentBuildTimeLeaseExtender.java 63.23% <0.00%> (ø)
...pache/pinot/core/api/AutoLoadedServiceForTest.java 0.00% <0.00%> (ø)
...not/ingestion/common/DefaultControllerRestApi.java 0.00% <0.00%> (ø)
...apache/pinot/ingestion/jobs/SegmentUriPushJob.java 0.00% <0.00%> (ø)
... and 1329 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

if (t instanceof Exception) {
LOGGER.error("Caught exception while processing query: " + _queryContext, t);
} else {
LOGGER.error("Caught serious error while processing query: " + _queryContext, t);
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if I follow the distinction here between an exception and a serious error

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Usually Java doesn't want user code to catch the Error which indicates some serious problems (see Error.java for more details). But for our specific case, we need to catch them in the sub-thread, or the thread will die without inserting the exceptions, and can cause unexpected behavior. Will add some comments

Copy link
Contributor

@siddharthteotia siddharthteotia left a comment

Choose a reason for hiding this comment

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

Just a minor clarification on exception. LGTM otherwise

@Jackie-Jiang Jackie-Jiang merged commit 2ba230c into apache:master Oct 31, 2022
@Jackie-Jiang Jackie-Jiang deleted the combine_operator_error branch October 31, 2022 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants