SaketaChalamchala commented on code in PR #9985:
URL: https://github.com/apache/ozone/pull/9985#discussion_r3061115823
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmSnapshotManager.java:
##########
@@ -855,17 +857,56 @@ public SnapshotDiffResponse getSnapshotDiffReport(final
String volume,
fromSnapshot, toSnapshot, index, pageSize, forceFullDiff,
disableNativeDiff);
- // Check again to make sure that from and to snapshots are still active and
- // were not deleted in between response generation.
- // Ideally, snapshot diff and snapshot deletion should take an explicit
lock
- // to achieve the synchronization, but it would be complex and expensive.
- // To avoid the complexity, we just check that snapshots are active
- // before returning the response. It is like an optimistic lock to achieve
- // similar behaviour and make sure client gets consistent response.
validateSnapshotsExistAndActive(volume, bucket, fromSnapshot, toSnapshot);
return snapshotDiffReport;
}
+ public SnapshotDiffResponse getSnapshotDiffResponse(final String volume,
+ final String bucket,
+ final String
fromSnapshot,
+ final String toSnapshot,
+ final String token,
Review Comment:
Added the validation.
--
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]