ChenSammi commented on code in PR #6611:
URL: https://github.com/apache/ozone/pull/6611#discussion_r1599549034
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/volume/HddsVolume.java:
##########
@@ -470,4 +461,22 @@ private void closeDbStore() {
LOG.info("SchemaV3 db is stopped at {} for volume {}", containerDBPath,
getStorageID());
}
+
+ public boolean compactDb() {
+ File dbDir = getDbParentDir();
+ File dbFile = new File(dbDir, CONTAINER_DB_NAME);
+ if (dbFile.exists() && dbFile.canRead()) {
Review Comment:
There is no need to check exists and canRead, which is covered in check()
already. If it's checked here, then you should mark the volume as failure if
check failed. This boolean result is not used any where, maybe a void return is
better.
--
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]