You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "anuragp010 (via GitHub)" <gi...@apache.org> on 2026/10/23 15:03:10 UTC

[PR] HDDS-17374. Handle old clients not passing StoragePolicy in allocateBlock [ozone]

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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-17374. Handle old clients not passing StoragePolicy in allocateBlock [ozone]

Posted by "anuragp010 (via GitHub)" <gi...@apache.org>.
anuragp010 commented on PR #11716:
URL: https://github.com/apache/ozone/pull/11716#issuecomment-6413465327

   The behaviour of `allocateBlock` is to allocate a block based on the args passed to it. We would be modifying the core behaviour of `allocateBlock` here, which is not intended. Hence, the following scenarios must be documented for the feature - If the bucket policy changes before a subsequent `allocateBlock` made from an older client, then some blocks of the key will not respect the `StoragePolicy` of the key.


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-17374. Handle old clients not passing StoragePolicy in allocateBlock [ozone]

Posted by "anuragp010 (via GitHub)" <gi...@apache.org>.
anuragp010 closed pull request #11716: HDDS-17374. Handle old clients not passing StoragePolicy in allocateBlock
URL: https://github.com/apache/ozone/pull/11716


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org