You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "devmadhuu (via GitHub)" <gi...@apache.org> on 2026/09/02 14:01:00 UTC
[PR] HDDS-15872. Ozone Bucket Support StoragePolicy and allowFallbackStoragePolicy. [ozone]
devmadhuu opened a new pull request, #11192:
URL: https://github.com/apache/ozone/pull/11192
## What changes were proposed in this pull request?
This PR is to add `storagePolicy` and `allowFallbackStoragePolicy` as bucket properties. The two fields flow end-to-end from the client into the OM bucket record, through `OmBucketInfo` / `OmBucketArgs` serialization, and out again into recon and s3g stubs. The deprecated `hadoop.hdds.protocol.StorageType` wrapper enum on the bucket surface is removed.
This is the client / OM-side data-model change only. There will be follow up PRs which will replace the current `OzoneStoragePolicy.getDefaultPolicy()` hard-coded default in `OMKeyRequest.allocateBlock`.
### Wire-format compatibility
**This is a breaking wire change for the OM database.** `BucketInfo.storageType = 5` was `required` in the previous schema; every serialized bucket row in an existing OM RocksDB carries field-tag 5 bytes. After this change,
`OmBucketInfo.getFromProtobuf` no longer reads that field, so existing rows will have `storagePolicy = null` on read. Downstream code tolerates this by defaulting to `OzoneStoragePolicy.getDefaultPolicy()` (currently `WARM`)
inside `RpcClient.createBucket`.
Field numbers 5 (BucketInfo) and 6 (BucketArgs) are reserved so they cannot be silently re-used for a different field type in the future.
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-15872
## How was this patch tested?
~30 tests updated for the new bucket surface. Representative changes:
- `OMRequestTestUtils.newBucketInfoBuilder` no longer sets `storageType` on
the proto (the field is `reserved`).
- `TestOmBucketInfo`, `TestBucketManagerImpl`, `TestOMBucketCreateRequest`,
`TestOMBucketCreateRequestWithFSO`, `TestOMClientRequestWithUserInfo`,
`TestOzoneManagerHAWithAllRunning`, `OzoneRpcClientTests`, `TestEndpoints`
(recon) migrated from `StorageType.X` / `getStorageType()` to
`OzoneStoragePolicy.Y` / `getStoragePolicy()`.
- Recon `AbstractTreeNSSummaryScenario` and `FlatNSSummaryScenario` drop
the `storageType` assertion (no storage-policy equivalent was set in
those scenarios).
--
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-15872. Ozone Bucket Support StoragePolicy and allowFallbackStoragePolicy. [ozone]
Posted by "xichen01 (via GitHub)" <gi...@apache.org>.
xichen01 commented on PR #11192:
URL: https://github.com/apache/ozone/pull/11192#issuecomment-5604636917
LGTM+1, thanks
--
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-15872. Ozone Bucket Support StoragePolicy and allowFallbackStoragePolicy. [ozone]
Posted by "devmadhuu (via GitHub)" <gi...@apache.org>.
devmadhuu commented on PR #11192:
URL: https://github.com/apache/ozone/pull/11192#issuecomment-5525678837
@xichen01 This patch is adaptation of patch diff 13 from the tar. Thanks for your contribution. Kindly review adaptation patch.
--
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-15872. Ozone Bucket Support StoragePolicy and allowFallbackStoragePolicy. [ozone]
Posted by "ivandika3 (via GitHub)" <gi...@apache.org>.
ivandika3 merged PR #11192:
URL: https://github.com/apache/ozone/pull/11192
--
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-15872. Ozone Bucket Support StoragePolicy and allowFallbackStoragePolicy. [ozone]
Posted by "devmadhuu (via GitHub)" <gi...@apache.org>.
devmadhuu commented on PR #11192:
URL: https://github.com/apache/ozone/pull/11192#issuecomment-5597914747
Thanks @xichen01 for reviewing the patch. Addressed the review comments. Kindly have a look again.
--
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-15872. Ozone Bucket Support StoragePolicy and allowFallbackStoragePolicy. [ozone]
Posted by "devmadhuu (via GitHub)" <gi...@apache.org>.
devmadhuu commented on PR #11192:
URL: https://github.com/apache/ozone/pull/11192#issuecomment-5567137127
@xichen01 request you to kindly review the patch.
--
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-15872. Ozone Bucket Support StoragePolicy and allowFallbackStoragePolicy. [ozone]
Posted by "devmadhuu (via GitHub)" <gi...@apache.org>.
devmadhuu commented on PR #11192:
URL: https://github.com/apache/ozone/pull/11192#issuecomment-5621229932
@ivandika3 would you like to have a review ?
--
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-15872. Ozone Bucket Support StoragePolicy and allowFallbackStoragePolicy. [ozone]
Posted by "xichen01 (via GitHub)" <gi...@apache.org>.
xichen01 commented on code in PR #11192:
URL: https://github.com/apache/ozone/pull/11192#discussion_r3960700397
##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/security/acl/OzoneObj.java:
##########
@@ -139,7 +139,7 @@ public String toString() {
public Map<String, String> toAuditMap() {
Map<String, String> auditMap = new LinkedHashMap<>();
auditMap.put(OzoneConsts.RESOURCE_TYPE, this.getResourceType().value);
- auditMap.put(OzoneConsts.STORAGE_TYPE, this.getStoreType().value);
+ auditMap.put(OzoneConsts.STORE_TYPE, this.getStoreType().value);
Review Comment:
This may be an irrelevant change; it can be removed.
##########
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/BucketArgs.java:
##########
@@ -190,7 +205,8 @@ public String getOwner() {
*/
public static class Builder {
private boolean versioning;
- private StorageType storageType;
Review Comment:
We should update the Recon side too.
--
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