hemantk-12 commented on code in PR #5035:
URL: https://github.com/apache/ozone/pull/5035#discussion_r1258629967
##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/RocksDatabase.java:
##########
@@ -979,9 +982,17 @@ public void deleteFilesNotMatchingPrefix(
+ " {} from db: {}", sstFileName,
liveFileMetaData.columnFamilyName(), db.get().getName());
db.get().deleteFile(sstFileName);
+ filesToBeDeleted.add(new File(liveFileMetaData.path(),
+ liveFileMetaData.fileName()));
}
}
}
+
+ Iterator<File> files = filesToBeDeleted.iterator();
+ while (files.hasNext()) {
Review Comment:
I see.
If delete to be synchronous, I think `waitForFileDelete` should be internal
to `RocksDatabase` or should be moved to
[RocksDBUtils`](https://github.com/apache/ozone/blob/master/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/debug/RocksDBUtils.java)
or
[RdbUtil](https://github.com/apache/ozone/blob/master/hadoop-hdds/rocksdb-checkpoint-differ/src/main/java/org/apache/ozone/rocksdb/util/RdbUtil.java).
As the name says `RDBCheckpointUtils` is for Checkpoint and not for a general
RDB util.
##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/RocksDatabase.java:
##########
@@ -979,9 +982,17 @@ public void deleteFilesNotMatchingPrefix(
+ " {} from db: {}", sstFileName,
liveFileMetaData.columnFamilyName(), db.get().getName());
db.get().deleteFile(sstFileName);
+ filesToBeDeleted.add(new File(liveFileMetaData.path(),
+ liveFileMetaData.fileName()));
}
}
}
+
+ Iterator<File> files = filesToBeDeleted.iterator();
+ while (files.hasNext()) {
Review Comment:
I see.
If delete to be synchronous, I think `waitForFileDelete` should be internal
to `RocksDatabase` or should be moved to
[RocksDBUtils](https://github.com/apache/ozone/blob/master/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/debug/RocksDBUtils.java)
or
[RdbUtil](https://github.com/apache/ozone/blob/master/hadoop-hdds/rocksdb-checkpoint-differ/src/main/java/org/apache/ozone/rocksdb/util/RdbUtil.java).
As the name says `RDBCheckpointUtils` is for Checkpoint and not for a general
RDB util.
--
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]