swamirishi commented on code in PR #8157:
URL: https://github.com/apache/ozone/pull/8157#discussion_r2021899830
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmSnapshotManager.java:
##########
@@ -849,6 +856,25 @@ private void validateSnapshotsExistAndActive(final String
volumeName,
checkSnapshotActive(toSnapInfo, false);
}
+ public void validateSnapshotLimit() throws IOException {
Review Comment:
Make this method synchronized and have a parameter in memory which keeps the
number of snapshots creation in flight in memory. On hindsight I believe we
should not put this check inside validateAndUpdateCache since this can impact
ratis replays. @hemantk-12
The in memory count should be increased once the pre execute passes inside a
synchronized block and should be decremented once the snapshot gets added on to
the snapshot chain in validateAndUpdate cache. The total number of snapshots at
any time would be:
totalSnapshots = snapshotChainManager.size() + inmemoryCounter
--
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]