swamirishi commented on code in PR #9132:
URL: https://github.com/apache/ozone/pull/9132#discussion_r2578943995


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -4046,7 +4049,17 @@ public synchronized TermIndex 
installSnapshotFromLeader(String leaderId) {
     try {
       // Install hard links.
       OmSnapshotUtils.createHardLinks(omDBCheckpoint.getCheckpointLocation(), 
false);
-      termIndex = installCheckpoint(leaderId, omDBCheckpoint);
+      Path checkpointLocation = omDBCheckpoint.getCheckpointLocation();
+      if (checkpointLocation == null) {
+        throw new IOException("Cannot install checkpoint from leader " + 
leaderId + ": checkpointLocation is null");
+      }
+      Path parent = checkpointLocation.getParent();
+      if (parent == null) {
+        throw new IOException("Cannot install checkpoint from leader " + 
leaderId +
+            ": checkpointLocation has no parent: " + checkpointLocation);
+      }
+      Path checkpointDataDir = Paths.get(parent.toString(), 
OM_CHECKPOINT_DATA_DIR);

Review Comment:
   Let us have a different implementation of DBCheckpoint and not stuff 
everything in RocksDBCheckpoint. The Om before snapshot was sending a Rocksdb 
checkpoint but right now it is actually sending metadata checkpoint not just 
rocksdb



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