replication: pass isFromOtherCluster also to EventNotification

EventNotification is consistent with message queue and metadata logs.
This commit is contained in:
Chris Lu
2020-07-01 08:06:20 -07:00
parent 31e23e9783
commit 37d5b3ba12
5 changed files with 362 additions and 346 deletions

View File

@@ -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