smengcl commented on code in PR #4398:
URL: https://github.com/apache/ozone/pull/4398#discussion_r1139642086


##########
hadoop-ozone/interface-client/src/main/proto/OmClientProtocol.proto:
##########
@@ -1694,6 +1694,7 @@ message SnapshotDiffRequest {
   optional string toSnapshot = 4;
   optional string token = 5;
   optional uint32 pageSize = 6;
+  optional bool fullDiff = 7;

Review Comment:
   ```suggestion
     optional bool forceFullDiff = 7;
   ```



##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/shell/snapshot/SnapshotDiffHandler.java:
##########
@@ -54,6 +54,11 @@ public class SnapshotDiffHandler extends Handler {
           " (optional)")
   private int pageSize;
 
+  @CommandLine.Option(names = {"-fd", "--use-full-diff"},

Review Comment:
   ```suggestion
     @CommandLine.Option(names = {"--ffd", "--force-full-diff"},
   ```



##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotDiffManager.java:
##########
@@ -389,11 +393,13 @@ private Set<String> getDeltaFiles(OmSnapshot fromSnapshot,
       // End of Workaround
     }
 
-    if (deltaFiles.isEmpty()) {
+    if (useFullDiff || deltaFiles.isEmpty()) {

Review Comment:
   This new condition looks reasonable to me.
   
   But I'd like @sadanand48 or @hemantk-12 to review this change in this class 
as well.



##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/shell/snapshot/SnapshotDiffHandler.java:
##########
@@ -54,6 +54,11 @@ public class SnapshotDiffHandler extends Handler {
           " (optional)")
   private int pageSize;
 
+  @CommandLine.Option(names = {"-fd", "--use-full-diff"},
+      description = "perform full diff of snapshot without using" +
+          " optimised DAG based pruning approach (optional)")
+  private boolean fullDiff;

Review Comment:
   This option would be useful for debugging. But for now let's hide this 
option by default to regular users (still usable). We can decide whether to 
unhide this later.
   
   ```suggestion
         description = "perform full diff of snapshot without using" +
             " optimised DAG based pruning approach (optional)",
         hidden = true)
     private boolean fullDiff;
   ```



-- 
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]

Reply via email to