hemantk-12 commented on code in PR #5035:
URL: https://github.com/apache/ozone/pull/5035#discussion_r1267498449
##########
hadoop-hdds/managed-rocksdb/src/main/java/org/apache/hadoop/hdds/utils/db/managed/ManagedRocksDB.java:
##########
@@ -78,4 +86,20 @@ public static ManagedRocksDB open(
RocksDB.open(path, columnFamilyDescriptors, columnFamilyHandles)
);
}
+
+ /**
+ * Delete liveMetaDataFile from rocks db using RocksDB#deleteFile Api.
+ * This function makes the RocksDB#deleteFile Api synchronized by waiting
+ * for the deletes to happen.
+ * @param fileToBeDeleted File to be deleted.
+ * @throws RocksDBException In the underlying db throws an exception.
+ * @throws IOException In the case file is not deleted.
+ */
+ public void deleteFile(LiveFileMetaData fileToBeDeleted)
+ throws RocksDBException, IOException {
+ String sstFileName = fileToBeDeleted.fileName();
+ this.get().deleteFile(sstFileName);
+ File file = new File(fileToBeDeleted.path(), fileToBeDeleted.fileName());
+ ManagedRocksObjectUtils.waitForFileDelete(file, Duration.ofSeconds(60));
Review Comment:
Based on the current usage of this function, only SST filtering service will
fail for the snapshot.
https://github.com/apache/ozone/blob/7a19afa71401e356cd86a99648e94278ea2850c8/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/SstFilteringService.java#L193
--
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]