sadanand48 commented on code in PR #9131:
URL: https://github.com/apache/ozone/pull/9131#discussion_r2465062057
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMDBCheckpointServletInodeBasedXfer.java:
##########
@@ -398,6 +410,29 @@ Set<Path> getSnapshotDirs(OMMetadataManager
omMetadataManager) throws IOExceptio
return snapshotPaths;
}
+ /**
+ * Collects paths to all snapshot databases from the OM DB.
+ *
+ * @param omMetadataManager OMMetadataManager instance
+ * @return Set of paths to snapshot databases
+ * @throws IOException if an I/O error occurs
+ */
+ Set<Path> getSnapshotDirsFromDB(OMMetadataManager omMetadataManager) throws
IOException {
Review Comment:
1. getSnapshotDirs reads from the snapshotChainManager before the
checkpoint has been taken.
2. getSnapshotDirsFromDB reads directly from the table from the checkpoint.
If I use method 2 throughout, would also need to handle locking aspect as we
are reading from active DB which is prone to updates. We can leverage the
in-memory chain manager that is already present when possible .
--
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]