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

@@ -36,17 +36,16 @@ func (f *Filer) NotifyUpdateEvent(ctx context.Context, oldEntry, newEntry *Entry
newParentPath, _ = newEntry.FullPath.DirAndName()
}
eventNotification := &filer_pb.EventNotification{
OldEntry: oldEntry.ToProtoEntry(),
NewEntry: newEntry.ToProtoEntry(),
DeleteChunks: deleteChunks,
NewParentPath: newParentPath,
OldEntry: oldEntry.ToProtoEntry(),
NewEntry: newEntry.ToProtoEntry(),
DeleteChunks: deleteChunks,
NewParentPath: newParentPath,
IsFromOtherCluster: isFromOtherCluster,
}
if notification.Queue != nil {
if !isFromOtherCluster {
glog.V(3).Infof("notifying entry update %v", fullpath)
notification.Queue.SendMessage(fullpath, eventNotification)
}
glog.V(3).Infof("notifying entry update %v", fullpath)
notification.Queue.SendMessage(fullpath, eventNotification)
}
f.logMetaEvent(ctx, fullpath, eventNotification)