sumitagrawl commented on code in PR #8917:
URL: https://github.com/apache/ozone/pull/8917#discussion_r2267021134


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/spi/impl/ReconDBProvider.java:
##########
@@ -115,4 +128,25 @@ public void close() throws Exception {
       dbStore = null;
     }
   }
+
+  public void replaceStagedDb(ReconDBProvider stagedReconDBProvider) throws 
Exception {
+    File dbPath = dbStore.getDbLocation();
+    File stagedDbPath = stagedReconDBProvider.getDbStore().getDbLocation();
+    File backupPath = new File(dbPath.getAbsolutePath() + ".backup");
+    stagedReconDBProvider.close();
+    try {
+      FileUtils.deleteDirectory(backupPath);

Review Comment:
   there, it should fail as if backup path is not able to operate,  means some 
problem like permission issue.



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