hemantk-12 commented on code in PR #4993:
URL: https://github.com/apache/ozone/pull/4993#discussion_r1244501118
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotDiffManager.java:
##########
@@ -1522,6 +1518,25 @@ private synchronized void updateJobStatus(String jobKey,
snapDiffJobTable.put(jobKey, snapshotDiffJob);
}
+ private synchronized void updateJobStatusToFailed(String jobKey,
+ String reason) {
+ SnapshotDiffJob snapshotDiffJob = snapDiffJobTable.get(jobKey);
+ if (snapshotDiffJob.getStatus() != IN_PROGRESS) {
Review Comment:
No, that should not happen. If happens, job is in invalid state.
Flow is Queue -> In_Progress/Rejected -> Done/Failed/Cancelled.
1. Once job is queue, we check if executor can take more job if yes, then
change the state to In_Progress otherwise Rejected.
2. In_Progress job is marked Done if report is generated successfully. In
case of failure, job is marked Failed. Cancel is marked if someone execute the
cancel request only if job is f In_Progress otherwise cancel request fails.
--
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]