mirror of
https://github.com/minio/minio.git
synced 2025-11-07 04:42:56 -05:00
fix: relax some replication validations (#10210)
Also inherit storage class from source object if replication configuration does not have a storage class specified for destination bucket.
This commit is contained in:
@@ -145,11 +145,8 @@ func (c Config) FilterActionableRules(obj ObjectOpts) []Rule {
|
||||
|
||||
// GetDestination returns destination bucket and storage class.
|
||||
func (c Config) GetDestination() Destination {
|
||||
for _, rule := range c.Rules {
|
||||
if rule.Status == Disabled {
|
||||
continue
|
||||
}
|
||||
return rule.Destination
|
||||
if len(c.Rules) > 0 {
|
||||
return c.Rules[0].Destination
|
||||
}
|
||||
return Destination{}
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ func (r Rule) Validate(bucket string, sameTarget bool) error {
|
||||
if err := r.DeleteMarkerReplication.Validate(); err != nil {
|
||||
return err
|
||||
}
|
||||
if r.Priority <= 0 {
|
||||
if r.Priority < 0 {
|
||||
return errPriorityMissing
|
||||
}
|
||||
if r.Destination.Bucket == bucket && sameTarget {
|
||||
|
||||
Reference in New Issue
Block a user