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

   ## What changes were proposed in this pull request?
   
   Add protobuf schemas and domain models for Object Lock retention and legal 
hold settings.
   
   Buckets gain optional objectLockEnabled and defaultRetention fields. KeyInfo 
and KeyInfoProtoLight gain retentionDate, retentionConfig, and legalHold fields 
at indices 23, 24, and 25.
   
   Update OmBucketInfo and OmKeyInfo to preserve these settings through 
protobuf conversion, metadata codecs, and object copies. Add an immutable 
Retention model and utilities for retention rule validation and UTC expiration 
calculations.
   
   Event Hold settings are represented in the schema; state transitions and 
WORM enforcement remain separate tasks.
   
   ## What is the link to the Apache JIRA
   
   [HDDS-16485](https://issues.apache.org/jira/browse/HDDS-16485)
   
   ## How was this patch tested?
   
   Added tests covering protobuf conversion, metadata copies, open-key and 
committed-key codecs, Light proto compatibility, and missing optional fields. 
Retention tests cover date calculations, leap years, expiration boundaries, 
invalid rules, and overflow.
   
   All 23 tests in TestOmBucketInfo, TestOmKeyInfo, and TestOmKeyInfoCodec 
passed. All four tests in TestRetention passed. Checkstyle, RAT, and git diff 
--check passed.


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