filer: support active<=>active filer replication

This commit is contained in:
Chris Lu
2020-06-30 22:53:53 -07:00
parent 7be57a1504
commit 31e23e9783
21 changed files with 369 additions and 313 deletions

View File

@@ -15,7 +15,7 @@ import (
"github.com/chrislusf/seaweedfs/weed/util"
)
func (f *Filer) NotifyUpdateEvent(ctx context.Context, oldEntry, newEntry *Entry, deleteChunks bool) {
func (f *Filer) NotifyUpdateEvent(ctx context.Context, oldEntry, newEntry *Entry, deleteChunks, isFromOtherCluster bool) {
var fullpath string
if oldEntry != nil {
fullpath = string(oldEntry.FullPath)
@@ -43,8 +43,10 @@ func (f *Filer) NotifyUpdateEvent(ctx context.Context, oldEntry, newEntry *Entry
}
if notification.Queue != nil {
glog.V(3).Infof("notifying entry update %v", fullpath)
notification.Queue.SendMessage(fullpath, eventNotification)
if !isFromOtherCluster {
glog.V(3).Infof("notifying entry update %v", fullpath)
notification.Queue.SendMessage(fullpath, eventNotification)
}
}
f.logMetaEvent(ctx, fullpath, eventNotification)