peterxcli commented on code in PR #8157:
URL: https://github.com/apache/ozone/pull/8157#discussion_r2016283073
##########
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:
> > 2. Should we compare it against total snapshots? I'm thinking that if
there is an issue in the SnapshotDeletionService, we may accumulate a lot of
snapshots without knowing that there is a problem in the snapshot purge unless
someone has good dashboard and alarms in place.
>
> Maybe use the size of globalSnapshotChain map in SnapshotChainManager?
@SaketaChalamchala Do you have any thoughts on this? Thanks
--
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]