Summary
BucketDetails currently only exposes a boolean Locking flag. Callers that need to
display or act on the default retention configuration must issue a separate S3
GetObjectLockConfiguration request per bucket — O(N) requests for N locked buckets.
Proposed change
Add a BucketRetentionConfig struct and a RetentionConfig *BucketRetentionConfig
field to BucketDetails so the default retention rule (mode, days, years) is returned
in bulk alongside the rest of the bucket details via AccountInfo.
RetentionConfig is nil when the bucket has no default retention rule set.
Motivation
The MinIO AIStor console /buckets/object-locking screen lists all locked buckets with
their retention configuration. With the current API it fires one S3 request per locked
bucket on page load. With thousands of locked buckets this is a significant performance
problem.
PR
#575
Summary
BucketDetailscurrently only exposes a booleanLockingflag. Callers that need todisplay or act on the default retention configuration must issue a separate S3
GetObjectLockConfigurationrequest per bucket — O(N) requests for N locked buckets.Proposed change
Add a
BucketRetentionConfigstruct and aRetentionConfig *BucketRetentionConfigfield to
BucketDetailsso the default retention rule (mode, days, years) is returnedin bulk alongside the rest of the bucket details via
AccountInfo.RetentionConfigis nil when the bucket has no default retention rule set.Motivation
The MinIO AIStor console
/buckets/object-lockingscreen lists all locked buckets withtheir retention configuration. With the current API it fires one S3 request per locked
bucket on page load. With thousands of locked buckets this is a significant performance
problem.
PR
#575