mirror of
https://github.com/minio/minio.git
synced 2025-01-23 12:43:16 -05:00
handle crashes with ILM expiry changes (#18590)
This commit is contained in:
parent
45b7253f39
commit
f327b21557
@ -3724,6 +3724,10 @@ func (c *SiteReplicationSys) SiteReplicationMetaInfo(ctx context.Context, objAPI
|
||||
}
|
||||
|
||||
if meta.lifecycleConfig != nil && meta.lifecycleConfig.HasExpiry() {
|
||||
var updatedAt time.Time
|
||||
if meta.lifecycleConfig.ExpiryUpdatedAt != nil {
|
||||
updatedAt = *meta.lifecycleConfig.ExpiryUpdatedAt
|
||||
}
|
||||
for _, rule := range meta.lifecycleConfig.Rules {
|
||||
if !rule.Expiration.IsNull() || !rule.NoncurrentVersionExpiration.IsNull() {
|
||||
// copy the non transition details of the rule
|
||||
@ -3731,7 +3735,7 @@ func (c *SiteReplicationSys) SiteReplicationMetaInfo(ctx context.Context, objAPI
|
||||
if err != nil {
|
||||
return info, errSRBackendIssue(err)
|
||||
}
|
||||
allRules[rule.ID] = madmin.ILMExpiryRule{ILMRule: string(ruleData), Bucket: bucket, UpdatedAt: *(meta.lifecycleConfig.ExpiryUpdatedAt)}
|
||||
allRules[rule.ID] = madmin.ILMExpiryRule{ILMRule: string(ruleData), Bucket: bucket, UpdatedAt: updatedAt}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user