anuragp010 opened a new pull request, #12022: URL: https://github.com/apache/ozone/pull/12022
Co-authored-by: https://github.com/xichen01 ## What changes were proposed in this pull request? Currently, a client cannot pass a storage policy to `createFile`. This PR adds a `createFile` overload that takes a storage policy: `OzoneBucket#createFile`, `ClientProtocol#createFile` and `RpcClient#createFile`. If the client passes no policy, the OM chooses it: the bucket's policy if set, otherwise the cluster default. ZDU compatibility: 1. The client rejects a request that carries a policy when the OM version does not support it. 2. OM rejects a CreateFile request that carries a policy pre-finalization with the error code: `NOT_SUPPORTED_OPERATION_PRIOR_FINALIZATION` 3. OM doesn't persist the storage policy (default) of a file pre-finalization to ensure old OMs and new OMs don't apply the request differently. Generated with Claude code. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-16991 ## How was this patch tested? 1. Unit Tests 2. Integration Tests Note: `AbstractOMStoragePolicyUpgradeTest.java` is copied from the implementation in PR: https://github.com/apache/ozone/pull/11626 . -- 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]
