add WIP filer.replicate

This commit is contained in:
Chris Lu
2018-09-17 00:27:56 -07:00
parent 865a017936
commit 788acdf527
13 changed files with 594 additions and 96 deletions

View File

@@ -6,7 +6,7 @@ import (
"github.com/chrislusf/seaweedfs/weed/glog"
)
func (f *Filer) NotifyUpdateEvent(oldEntry, newEntry *Entry) {
func (f *Filer) NotifyUpdateEvent(oldEntry, newEntry *Entry, deleteChunks bool) {
var key string
if oldEntry != nil {
key = string(oldEntry.FullPath)
@@ -23,13 +23,13 @@ func (f *Filer) NotifyUpdateEvent(oldEntry, newEntry *Entry) {
notification.Queue.SendMessage(
key,
&filer_pb.EventNotification{
OldEntry: toProtoEntry(oldEntry),
NewEntry: toProtoEntry(newEntry),
OldEntry: toProtoEntry(oldEntry),
NewEntry: toProtoEntry(newEntry),
DeleteChunks: deleteChunks,
},
)
}
}
func toProtoEntry(entry *Entry) *filer_pb.Entry {