hemantk-12 commented on code in PR #8157:
URL: https://github.com/apache/ozone/pull/8157#discussion_r2012770082
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/snapshot/OMSnapshotCreateRequest.java:
##########
@@ -165,6 +165,14 @@ public OMClientResponse
validateAndUpdateCache(OzoneManager ozoneManager, Execut
throw new OMException("Snapshot already exists", FILE_ALREADY_EXISTS);
}
+ // Check snapshot limit
+ int maxSnapshots = ozoneManager.getFsSnapshotMaxLimit();
+ if (omMetrics.getNumSnapshotActive() >= maxSnapshots) {
Review Comment:
> Maybe use the size of globalSnapshotChain map in SnapshotChainManager?
Yes, this works too.
--
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]