hemantk-12 commented on code in PR #7200:
URL: https://github.com/apache/ozone/pull/7200#discussion_r1759877487
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/SnapshotChainManager.java:
##########
@@ -382,6 +389,41 @@ public UUID getLatestGlobalSnapshotId() throws IOException
{
return latestGlobalSnapshotId;
}
+ /**
+ * Get oldest of global snapshot in snapshot chain.
+ */
+ public UUID getOldestGlobalSnapshotId() throws IOException {
+ validateSnapshotChain();
+ return oldestGlobalSnapshotId;
+ }
+
+ public Iterator<UUID> iterator(final boolean reverse) throws IOException {
Review Comment:
qq: Since all the write methods of `SnapshotChainManager` are synchronized,
do we still need to keep `snapshotChainByPath` and `latestSnapshotIdByPath` as
`ConcurrentMap`? Maybe we change them to `LinkedHashMap` and then use
`LinkedHashMap`'s iterator.
--
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]