spacemonkd commented on PR #9886:
URL: https://github.com/apache/ozone/pull/9886#issuecomment-4069733050

   @kerneltime  We are putting behind a gate check.
   `schemaVersion: 0` vs `schemaVersion: 1` is checked in the actual flow.
   For partial upgrades where say one OM is upgraded but finalization is not 
done, the new field will still be 0 and hence the requests will still refer to 
the in-memory list.
   
   When the upgrade is finalized then the client will populate `schemaVersion: 
1` which will redirect new writes to the parts table.
   You can refer to below PoC code:
   - 
[S3InitiateMultipartUploadRequest](https://github.com/spacemonkd/ozone/blob/d1ba3753eb6128a12f7b13ee6777671d067825b0/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/s3/multipart/S3InitiateMultipartUploadRequest.java)
   - 
[S3MultipartUploadCommitPartRequest](https://github.com/spacemonkd/ozone/blob/d1ba3753eb6128a12f7b13ee6777671d067825b0/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/s3/multipart/S3MultipartUploadCommitPartRequest.java)
   - 
[OMLayoutFeature](https://github.com/spacemonkd/ozone/blob/d1ba3753eb6128a12f7b13ee6777671d067825b0/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/upgrade/OMLayoutFeature.java)
   
   Example gate:
   ```
   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);
         }
   ```


-- 
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]

Reply via email to