SaketaChalamchala commented on code in PR #9985:
URL: https://github.com/apache/ozone/pull/9985#discussion_r3103322890
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/protocolPB/OzoneManagerRequestHandler.java:
##########
@@ -1387,16 +1394,28 @@ private GetS3VolumeContextResponse getS3VolumeContext()
@DisallowedUntilLayoutVersion(FILESYSTEM_SNAPSHOT)
private SnapshotDiffResponse snapshotDiff(
SnapshotDiffRequest snapshotDiffRequest) throws IOException {
- org.apache.hadoop.ozone.snapshot.SnapshotDiffResponse response =
- impl.snapshotDiff(
- snapshotDiffRequest.getVolumeName(),
- snapshotDiffRequest.getBucketName(),
- snapshotDiffRequest.getFromSnapshot(),
- snapshotDiffRequest.getToSnapshot(),
- snapshotDiffRequest.getToken(),
- snapshotDiffRequest.getPageSize(),
- snapshotDiffRequest.getForceFullDiff(),
- snapshotDiffRequest.getDisableNativeDiff());
+ org.apache.hadoop.ozone.snapshot.SnapshotDiffResponse response;
+
+ if (snapshotDiffRequest.hasForceFullDiff() &&
snapshotDiffRequest.hasDisableNativeDiff()) {
+ response = impl.snapshotDiff(
+ snapshotDiffRequest.getVolumeName(),
+ snapshotDiffRequest.getBucketName(),
+ snapshotDiffRequest.getFromSnapshot(),
+ snapshotDiffRequest.getToSnapshot(),
+ snapshotDiffRequest.getToken(),
+ snapshotDiffRequest.getPageSize(),
+ snapshotDiffRequest.getForceFullDiff(),
+ snapshotDiffRequest.getDisableNativeDiff());
+ } else {
+ response = impl.snapshotDiff(
+ snapshotDiffRequest.getVolumeName(),
+ snapshotDiffRequest.getBucketName(),
+ snapshotDiffRequest.getFromSnapshot(),
+ snapshotDiffRequest.getToSnapshot(),
+ snapshotDiffRequest.getToken(),
+ snapshotDiffRequest.getPageSize());
+ }
Review Comment:
If legacy snapshotDiff is called then both forceFullDiff and
disableNativeDiff() will be set (at least to the defaults if not set explicitly
by the client).
--
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]