mirror of
https://github.com/minio/minio.git
synced 2025-01-12 15:33:22 -05:00
Avoid replicating dirs in listing with replication enabled (#15641)
When replication is enabled in a particular bucket, the listing will send objects to bucket replication, but it is also sending prefixes for non recursive listing which is useless and shows a lot of error logs. This commit will ignore prefixes.
This commit is contained in:
parent
f649968c69
commit
10e75116ef
@ -2401,8 +2401,8 @@ func getReplicationDiff(ctx context.Context, objAPI ObjectLayer, bucket string,
|
|||||||
|
|
||||||
// QueueReplicationHeal is a wrapper for queueReplicationHeal
|
// QueueReplicationHeal is a wrapper for queueReplicationHeal
|
||||||
func QueueReplicationHeal(ctx context.Context, bucket string, oi ObjectInfo) {
|
func QueueReplicationHeal(ctx context.Context, bucket string, oi ObjectInfo) {
|
||||||
// un-versioned case
|
// un-versioned or a prefix
|
||||||
if oi.VersionID == "" {
|
if oi.VersionID == "" || oi.ModTime.IsZero() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
rcfg, _, _ := globalBucketMetadataSys.GetReplicationConfig(ctx, bucket)
|
rcfg, _, _ := globalBucketMetadataSys.GetReplicationConfig(ctx, bucket)
|
||||||
@ -2416,8 +2416,8 @@ func QueueReplicationHeal(ctx context.Context, bucket string, oi ObjectInfo) {
|
|||||||
// queueReplicationHeal enqueues objects that failed replication OR eligible for resyncing through
|
// queueReplicationHeal enqueues objects that failed replication OR eligible for resyncing through
|
||||||
// an ongoing resync operation or via existing objects replication configuration setting.
|
// an ongoing resync operation or via existing objects replication configuration setting.
|
||||||
func queueReplicationHeal(ctx context.Context, bucket string, oi ObjectInfo, rcfg replicationConfig) (roi ReplicateObjectInfo) {
|
func queueReplicationHeal(ctx context.Context, bucket string, oi ObjectInfo, rcfg replicationConfig) (roi ReplicateObjectInfo) {
|
||||||
// un-versioned case
|
// un-versioned or a prefix
|
||||||
if oi.VersionID == "" {
|
if oi.VersionID == "" || oi.ModTime.IsZero() {
|
||||||
return roi
|
return roi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user