mcvsubbu commented on a change in pull request #7099:
URL: https://github.com/apache/incubator-pinot/pull/7099#discussion_r660966564
##########
File path:
pinot-minion/src/main/java/org/apache/pinot/minion/taskfactory/TaskFactoryRegistry.java
##########
@@ -88,24 +104,24 @@ public TaskResult run() {
Object executionResult =
_taskExecutor.executeTask(pinotTaskConfig);
long timeSpentInNanos = System.nanoTime() - startTimeInNanos;
_eventObserver.notifyTaskSuccess(pinotTaskConfig,
executionResult);
- minionMetrics.addMeteredTableValue(taskType,
MinionMeter.NUMBER_TASKS_COMPLETED, 1L);
- minionMetrics.addPhaseTiming(taskType,
MinionQueryPhase.TASK_EXECUTION, timeSpentInNanos);
+ _minionMetrics.addMeteredTableValue(taskType,
MinionMeter.NUMBER_TASKS_COMPLETED, 1L);
+ _minionMetrics.addPhaseTiming(taskType,
MinionQueryPhase.TASK_EXECUTION, timeSpentInNanos);
Review comment:
For now, runInternal() seems to catch all exceptions, yes. And we can
leave it like that.
In the parent run() method, I suggest:
try {
runInternal()
} finally {
update metrics
}
This will protect against any changes inside the runInternal logic that may
choose to bubble up exceptions or if there is some uncaught exception by
mistake.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]