anuragp010 opened a new pull request, #11716: URL: https://github.com/apache/ozone/pull/11716
## What changes were proposed in this pull request? With an upgraded cluster containing all OMs supporting storage policy, an older client without the Storage Policy changes will not send the `storagePolicy` field in any request made to the OM. This is of consequence to `allocateBlock` as it allocates block based on the storage policy sent by the client. If the client doesn't send a storage policy, it uses the bucket's policy and falls back to the default. But in the scenario where the bucket policy changes from the time key is created to the subsequent `allocateBlock` call, then `allocateBlock` will not follow the key's storage policy. This PR fixes that by getting the key's storage policy from the `openKeyTable` if not passed. Should the openKey not have a policy (Key is created pre upgrade on the OM), then `allocateBlock` will use the bucket's storage policy, falling back to the default if bucket's policy is null. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-17374 ## How was this patch tested? 1. Unit Tests -- 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]
