SaketaChalamchala commented on code in PR #11651:
URL: https://github.com/apache/ozone/pull/11651#discussion_r4363238104
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotDiffManager.java:
##########
@@ -656,48 +677,83 @@ public synchronized SubmitSnapshotDiffResponse
submitSnapshotDiff(
SnapshotDiffJob snapDiffJob = getSnapDiffReportStatus(snapDiffJobKey,
volumeName, bucketName, fromSnapshotName, toSnapshotName,
- forceFullDiff, disableNativeDiff);
+ forceFullDiff, disableNativeDiff, orderedReport);
JobStatus prevStatus = snapDiffJob.getStatus();
String prevReason = isEmpty(snapDiffJob.getReason()) ? null :
snapDiffJob.getReason();
String jobId = snapDiffJob.getJobId();
+ boolean createNewJob = false;
+ boolean submitJob = false;
+ boolean isFso = getBucketLayout(volumeName, bucketName,
activeOmMetadataManager).isFileSystemOptimized();
+ String responseMsg = "";
+
if (prevStatus == FAILED || prevStatus == REJECTED || prevStatus ==
CANCELLED) {
+ createNewJob = true;
+ submitJob = true;
+ } else if ((prevStatus == QUEUED || prevStatus == IN_PROGRESS ||
prevStatus == DONE) &&
Review Comment:
Good catch. I made the suggested change but I think a more cooperative
cancel/interrupt and cleanup of a snapshot diff job is worth a follow-up JIRA.
https://issues.apache.org/jira/browse/HDDS-17401
--
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]