hemantk-12 commented on code in PR #5317:
URL: https://github.com/apache/ozone/pull/5317#discussion_r1346243525


##########
hadoop-hdds/rocksdb-checkpoint-differ/src/main/java/org/apache/ozone/rocksdiff/RocksDBCheckpointDiffer.java:
##########
@@ -1185,85 +1194,72 @@ public void pruneOlderSnapshotsWithCompactionHistory() {
 
     try (BootstrapStateHandler.Lock lock = getBootstrapStateLock().lock()) {
       removeSstFiles(sstFileNodesRemoved);
-      deleteOlderSnapshotsCompactionFiles(olderSnapshotsLogFilePaths);
+      removeKeyFromCompactionLogTable(keysToRemove);
     } catch (InterruptedException e) {
       throw new RuntimeException(e);
     }
   }
 
-  /**
-   * Deletes the SST files from the backup directory if exists.
-   */
-  private void removeSstFiles(Set<String> sstFileNodes) {
-    for (String sstFileNode: sstFileNodes) {
-      File file =
-          new File(sstBackupDir + "/" + sstFileNode + SST_FILE_EXTENSION);
-      try {
-        Files.deleteIfExists(file.toPath());
-      } catch (IOException exception) {
-        LOG.warn("Failed to delete SST file: " + sstFileNode, exception);
-      }
-    }
-  }
 
   /**
-   * Returns the list of compaction log files which are older than allowed
-   * max time in the compaction DAG.
+   * Returns the list of input files from the compaction entries which are
+   * older than the maximum allowed in the compaction DAG.
    */
-  private List<Path> getOlderSnapshotsCompactionLogFilePaths() {
+  private synchronized Pair<List<String>, List<byte[]>> getOlderFileNodes() {
     long compactionLogPruneStartTime = System.currentTimeMillis();

Review Comment:
   Had a offline discussion and idea here is to use number DB transaction 
happened in between instead of using TTL based pruning.



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