devmadhuu commented on code in PR #11585:
URL: https://github.com/apache/ozone/pull/11585#discussion_r4313362530
##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/scm/ReconScmTask.java:
##########
@@ -94,8 +94,18 @@ public ReconTaskStatusUpdater getTaskStatusUpdater() {
protected void initializeAndRunTask() throws Exception {
Review Comment:
After below changes, please revisit the dead catch blocks in all the
`ReconScmTasks`. E.g. in `ContainerHealthTask` run method, catch block may no
longer be needed ? Check other tasks as well. Please make the code robust and
reliable and remove dead code.
##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/scm/ReconScmTask.java:
##########
@@ -94,8 +94,18 @@ public ReconTaskStatusUpdater getTaskStatusUpdater() {
protected void initializeAndRunTask() throws Exception {
taskStatusUpdater.recordRunStart();
- runTask();
- taskStatusUpdater.recordRunCompletion();
+ try {
+ taskStatusUpdater.setLastTaskRunStatus(0);
+ runTask();
Review Comment:
Check the impl of all `runTask` in all tasks if `isRunning()` needs to
check properly if the thread is alive because don't see `running` flag is set
to false anywhere except in `stop()`
--
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]