jojochuang commented on code in PR #10679:
URL: https://github.com/apache/ozone/pull/10679#discussion_r3533746133


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/OmSnapshotLocalDataManager.java:
##########
@@ -288,8 +288,28 @@ private void addMissingSnapshotYamlFiles(
   }
 
   void addVersionNodeWithDependents(OmSnapshotLocalData snapshotLocalData) 
throws IOException {
+    addVersionNodeWithDependents(snapshotLocalData, null);
+  }
+
+  /**
+   * Adds version nodes for the supplied snapshot local data and any unloaded 
previous snapshots it depends on.
+   * The graph must contain the previous snapshot's version node before the 
current snapshot's version node can be
+   * added. This method walks the previous-snapshot chain using persisted YAML 
metadata and processes the stack in
+   * dependency order.
+   *
+   * @param snapshotLocalData snapshot local data to add to the version graph
+   * @param failedFilePaths when non-null, a previous snapshot YAML that 
cannot be loaded or whose snapshotId does not
+   *     match its path is skipped instead of thrown, and the offending paths 
are recorded here so they are neither
+   *     reloaded nor re-logged during startup
+   * @return true if the snapshot local data was added or was already present, 
false if skipped due to an unloadable or
+   *     mismatched previous snapshot
+   * @throws IOException if a required YAML load fails, or the loaded 
snapshotId does not match, when failedFilePaths is
+   *     null
+   */
+  private boolean addVersionNodeWithDependents(OmSnapshotLocalData 
snapshotLocalData, Set<String> failedFilePaths)
+      throws IOException {
     if (versionNodeMap.containsKey(snapshotLocalData.getSnapshotId())) {
-      return;
+      return true;

Review Comment:
   return value not used.



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