spacemonkd commented on code in PR #10062:
URL: https://github.com/apache/ozone/pull/10062#discussion_r3378205894
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/s3/multipart/S3MultipartUploadAbortRequest.java:
##########
@@ -165,6 +165,17 @@ public OMClientResponse
validateAndUpdateCache(OzoneManager ozoneManager, Execut
OMException.ResultCodes.NO_SUCH_MULTIPART_UPLOAD_ERROR);
}
+ // This gate runs in the replicated apply path, so the check must remain
+ // deterministic across replicas for a given log index. MLV advances only
+ // via the Ratis-logged finalize-upgrade request.
+ if (!ozoneManager.getVersionManager()
+ .isAllowed(OMLayoutFeature.MPU_PARTS_TABLE_SPLIT)
+ && multipartKeyInfo.getSchemaVersion() != 0) {
+ throw new OMException("MPU parts-table split behavior is not allowed "
+
+ "before cluster finalization.",
+ OMException.ResultCodes.NOT_SUPPORTED_OPERATION_PRIOR_FINALIZATION);
+ }
Review Comment:
This check depends on `multipartKeyInfo.getSchemaVersion()` which is fetched
from OM metadata for the upload row.
The validator context right now doesn't have this information exposed in
PRE_PROCESS, so the pre-processor isn't implemented as you had provided in the
example.
I did change it to use the layout version stamped by the leader in
preExecute, so that way it will be more akin to the behaviour of a
pre-processor i.e. more deterministic
--
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]