smengcl commented on code in PR #4634:
URL: https://github.com/apache/ozone/pull/4634#discussion_r1184380068
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/snapshot/OMSnapshotCreateRequest.java:
##########
@@ -87,7 +89,15 @@ public OMSnapshotCreateRequest(OMRequest omRequest) {
}
@Override
+ @DisallowedUntilLayoutVersion(SNAPSHOT_SUPPORT)
public OMRequest preExecute(OzoneManager ozoneManager) throws IOException {
+ if (!ozoneManager.getVersionManager()
+ .isAllowed(SNAPSHOT_SUPPORT)) {
+ throw new OMException(
+ "cannot be invoked before finalization.",
Review Comment:
fyi this is the code that does the check (AspectJ):
https://github.com/apache/ozone/blob/92daac20f0375ecaff2f6b5aa5073c5f99f13d89/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/upgrade/OMLayoutFeatureAspect.java#L53-L79
--
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]