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

Logging a warn message instead of throwing exception for adhoc trigger #12546

Merged
merged 1 commit into from
Mar 18, 2024

Conversation

swaminathanmanish
Copy link
Contributor

Whats in the PR:
Logging a warn message when no task is submitted, instead of throwing an exception.

Why its needed:
The underlying task implementation need not generate a task for various reasons (eg: not re-ingesting same data). When there are no issues with the task trigger itself (eg: invalid inputs), we should not be throwing an exception which misleads users of this API into thinking theres an issue in the way, api is used. Also the logic in createTask does allow for empty task from individual taskType. We can stick to a warn message when none of the taskTypes generates a task. We do propagate the exception when there are invalid inputs or underlying task implementation throws an exception.

if (pinotTaskConfigs.isEmpty()) {
LOGGER.warn("No ad-hoc task generated for task type: {}", taskType);
continue;
}

@swaminathanmanish
Copy link
Contributor Author

cc @snleee , @xiangfu0 - Could you give your feedback ?

Copy link
Contributor

@xiangfu0 xiangfu0 left a comment

Choose a reason for hiding this comment

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

I'm ok with this change

@codecov-commenter
Copy link

codecov-commenter commented Mar 4, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 61.71%. Comparing base (59551e4) to head (be02bf8).
Report is 43 commits behind head on master.

Files Patch % Lines
...controller/helix/core/minion/PinotTaskManager.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #12546      +/-   ##
============================================
- Coverage     61.75%   61.71%   -0.04%     
  Complexity      207      207              
============================================
  Files          2436     2451      +15     
  Lines        133233   133632     +399     
  Branches      20636    20689      +53     
============================================
+ Hits          82274    82473     +199     
- Misses        44911    45061     +150     
- Partials       6048     6098      +50     
Flag Coverage Δ
custom-integration1 <0.01% <0.00%> (-0.01%) ⬇️
integration <0.01% <0.00%> (-0.01%) ⬇️
integration1 <0.01% <0.00%> (-0.01%) ⬇️
integration2 0.00% <0.00%> (ø)
java-11 61.68% <0.00%> (-0.03%) ⬇️
java-21 61.59% <0.00%> (-0.03%) ⬇️
skip-bytebuffers-false 61.70% <0.00%> (-0.05%) ⬇️
skip-bytebuffers-true 61.57% <0.00%> (+33.84%) ⬆️
temurin 61.71% <0.00%> (-0.04%) ⬇️
unittests 61.71% <0.00%> (-0.04%) ⬇️
unittests1 46.91% <ø> (+0.02%) ⬆️
unittests2 27.65% <0.00%> (-0.08%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@snleee snleee left a comment

Choose a reason for hiding this comment

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

I'm also good with this change. Thank you!

@snleee snleee merged commit def8a47 into apache:master Mar 18, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants