aboutsummaryrefslogtreecommitdiff
path: root/weed/replication/replicator.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-07-01 08:06:20 -0700
committerChris Lu <chris.lu@gmail.com>2020-07-01 08:06:20 -0700
commit37d5b3ba12a5eed0b534815ca1aad2ca3d8566bd (patch)
tree79087f2e4d0cf3913f209887a512a35b9ad0803a /weed/replication/replicator.go
parent31e23e97837ba8d6a403e0b8c2d9ea6ff0bc0387 (diff)
downloadseaweedfs-37d5b3ba12a5eed0b534815ca1aad2ca3d8566bd.tar.xz
seaweedfs-37d5b3ba12a5eed0b534815ca1aad2ca3d8566bd.zip
replication: pass isFromOtherCluster also to EventNotification
EventNotification is consistent with message queue and metadata logs.
Diffstat (limited to 'weed/replication/replicator.go')
-rw-r--r--weed/replication/replicator.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/weed/replication/replicator.go b/weed/replication/replicator.go
index 1ed60f536..051199adb 100644
--- a/weed/replication/replicator.go
+++ b/weed/replication/replicator.go
@@ -31,6 +31,9 @@ func NewReplicator(sourceConfig util.Configuration, configPrefix string, dataSin
}
func (r *Replicator) Replicate(ctx context.Context, key string, message *filer_pb.EventNotification) error {
+ if message.IsFromOtherCluster && r.sink.GetName() == "filer" {
+ return nil
+ }
if !strings.HasPrefix(key, r.source.Dir) {
glog.V(4).Infof("skipping %v outside of %v", key, r.source.Dir)
return nil