sadanand48 commented on code in PR #10692:
URL: https://github.com/apache/ozone/pull/10692#discussion_r3550130898
##########
hadoop-hdds/managed-rocksdb/src/main/java/org/apache/hadoop/hdds/utils/db/managed/ManagedRocksDB.java:
##########
@@ -211,7 +218,7 @@ public void deleteSstFileRange(
} catch (RocksDBException e) {
throw new RocksDatabaseException("Failed to delete " + file, e);
}
- ManagedRocksObjectUtils.waitForFileDelete(file, Duration.ofSeconds(60));
+ return file;
Review Comment:
```java
if (getLiveMetadataForSSTFiles(get()).containsKey(
FilenameUtils.getBaseName(fileToBeDeleted.fileName()))) {
throw new RocksDatabaseException("deleteFilesInRanges was a no-op for " +
file);
}
```
I think we can remove the wait altogether, If the file is removed off of the
live file metadata it is guaranteed to be physically removed from disk. Instead
of the wait we just check if the file is still in the metadata list and if yes
throw an exception. This is instantaneous and avoids long poll for 60s.
--
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]