peterxcli commented on code in PR #8157:
URL: https://github.com/apache/ozone/pull/8157#discussion_r2020374862
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/snapshot/OMSnapshotCreateRequest.java:
##########
@@ -99,11 +99,23 @@ public OMSnapshotCreateRequest(OMRequest omRequest) {
snapshotPath = snapshotInfo.getSnapshotPath();
}
+ private void validateSnapshotLimit(OzoneManager ozoneManager) throws
IOException {
+ int maxSnapshots = ozoneManager.getFsSnapshotMaxLimit();
+ OMMetrics omMetrics = ozoneManager.getMetrics();
+ if (omMetrics.getNumSnapshotActive() >= maxSnapshots) {
Review Comment:
Done. PTAL.
--
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]