errose28 commented on code in PR #10062:
URL: https://github.com/apache/ozone/pull/10062#discussion_r3375266258
##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmMultipartKeyInfo.java:
##########
@@ -87,6 +87,8 @@ public final class OmMultipartKeyInfo extends WithObjectID
implements CopyObject
// This stores the schema version of the multipart key.
// 0 - Legacy Schema -> Uses the same table to store the multipart part info
// 1 - New Schema -> Uses a separate table to store the multipart part info
+ private static final int LEGACY_SCHEMA_VERSION = 0;
+ private static final int SPLIT_PARTS_SCHEMA_VERSION = 1;
private final byte schemaVersion;
Review Comment:
Might as well make this an int if that is what we are using for the
constants. I don't think we need to be concerned with this level of memory
savings.
##########
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 looks like it should be a request pre-processor like
[this](https://github.com/apache/ozone/blob/631050666dc77ff052261af388299d88fea338e6/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/s3/multipart/S3MultipartUploadCommitPartRequest.java#L393).
We will be revamping how these pre and post processors are constructed as part
of ZDU but we will handle that migration on our feature branch.
--
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]