devmadhuu commented on code in PR #7517:
URL: https://github.com/apache/ozone/pull/7517#discussion_r1901658671
##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/scm/PipelineSyncTask.java:
##########
@@ -84,17 +88,25 @@ public void run() {
}
public void triggerPipelineSyncTask()
- throws IOException, TimeoutException, NodeNotFoundException {
+ throws IOException, NodeNotFoundException {
lock.writeLock().lock();
try {
long start = Time.monotonicNow();
List<Pipeline> pipelinesFromScm = scmClient.getPipelines();
+ taskStatusUpdater.setIsCurrentTaskRunning(1);
+ taskStatusUpdater.setLastUpdatedTimestamp(System.currentTimeMillis());
+ taskStatusUpdater.updateDetails();
reconPipelineManager.initializePipelines(pipelinesFromScm);
syncOperationalStateOnDeadNodes();
LOG.debug("Pipeline sync Thread took {} milliseconds.",
Time.monotonicNow() - start);
- recordSingleRunCompletion();
+ taskStatusUpdater.setLastTaskRunStatus(0);
+ } catch (IOException | NodeNotFoundException e) {
+ // If we encounter an exception, increment failure count for task and
bubble forward the exception
+ taskStatusUpdater.setLastTaskRunStatus(-1);
+ throw e;
Review Comment:
We need to update lastTaskRunStatus and currentlyRunning in Throwable catch
of all ReconScmTasks
--
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]