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