anuragp010 opened a new pull request, #12080:
URL: https://github.com/apache/ozone/pull/12080

   ## What changes were proposed in this pull request?
   `CreateBucket` and `SetBucketProperty` requests that carry storage policy 
fields must be rejected on the client side when the `omVersion` does not 
support storage policy. The OM already rejects such requests through its 
request validators, but the client side gate was missing. An OM binary older 
than the feature ignores the unknown protobuf fields, so the request would 
succeed with the policy silently dropped.
   
   This PR adds the client side gate in `RpcClient`: `createBucket` and both 
`setBucketStoragePolicy` overloads now throw `IOException("OzoneManager does 
not support storage policy")` when 
`STORAGE_POLICY_SUPPORT.isSupportedBy(omVersion)` is false. `createBucket` is 
gated only when a policy field is set, so clients that set none keep working.
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-17528
   
   ## How was this patch tested?
   1. Unit Test: `TestRpcClient`
   2. Integration Test: `TestOMStoragePolicyUpgrade`
   
   
   Generated with: Claude Code 


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