SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
add filer notification
Chris Luf036ef8a3c50
diff --git a/weed/command/filer.go b/weed/command/filer.goindex 17f2fbdcfd..d42db6418e 100644--- a/weed/command/filer.go+++ b/weed/command/filer.go@@ -32,6 +32,7 @@ type FilerOptions struct {secretKey *stringdirListingLimit *intdataCenter *string+ enableNotification *bool}func init() {@@ -49,6 +50,7 @@ func init() {f.secretKey = cmdFiler.Flag.String("secure.secret", "", "secret to encrypt Json Web Token(JWT)")f.dirListingLimit = cmdFiler.Flag.Int("dirListLimit", 1000, "limit sub dir listing size")f.dataCenter = cmdFiler.Flag.String("dataCenter", "", "prefer to write to volumes in this data center")+ f.enableNotification = cmdFiler.Flag.Bool("notify", false, "send file updates to the queue defined in message_queue.toml")}var cmdFiler = &Command{@@ -90,14 +92,15 @@ func (fo *FilerOptions) start() {fs, nfs_err := weed_server.NewFilerServer(defaultMux, publicVolumeMux, &weed_server.FilerOption{Masters: strings.Split(*f.masters, ","),- Collection: *f.collection,- DefaultReplication: *f.defaultReplicaPlacement,- RedirectOnRead: *f.redirectOnRead,- DisableDirListing: *f.disableDirListing,- MaxMB: *f.maxMB,- SecretKey: *f.secretKey,- DirListingLimit: *f.dirListingLimit,- DataCenter: *f.dataCenter,+ Collection: *fo.collection,+ DefaultReplication: *fo.defaultReplicaPlacement,+ RedirectOnRead: *fo.redirectOnRead,+ DisableDirListing: *fo.disableDirListing,+ MaxMB: *fo.maxMB,+ SecretKey: *fo.secretKey,+ DirListingLimit: *fo.dirListingLimit,+ DataCenter: *fo.dataCenter,+ EnableNotification: *fo.enableNotification,})if nfs_err != nil {glog.Fatalf("Filer startup error: %v", nfs_err)@@ -127,9 +130,9 @@ func (fo *FilerOptions) start() {}// starting grpc server- grpcPort := *f.grpcPort+ grpcPort := *fo.grpcPortif grpcPort == 0 {- grpcPort = *f.port + 10000+ grpcPort = *fo.port + 10000}grpcL, err := util.NewListener(":"+strconv.Itoa(grpcPort), 0)if err != nil {diff --git a/weed/command/server.go b/weed/command/server.goindex b0c6a1ed5d..bef5e635e6 100644--- a/weed/command/server.go+++ b/weed/command/server.go@@ -84,12 +84,14 @@ func init() {serverOptions.cpuprofile = cmdServer.Flag.String("cpuprofile", "", "cpu profile output file")filerOptions.collection = cmdServer.Flag.String("filer.collection", "", "all data will be stored in this collection")filerOptions.port = cmdServer.Flag.Int("filer.port", 8888, "filer server http listen port")+ filerOptions.grpcPort = cmdServer.Flag.Int("filer.port.grpc", 0, "filer grpc server listen port, default to http port + 10000")filerOptions.publicPort = cmdServer.Flag.Int("filer.port.public", 0, "filer server public http listen port")filerOptions.defaultReplicaPlacement = cmdServer.Flag.String("filer.defaultReplicaPlacement", "", "Default replication type if not specified during runtime.")filerOptions.redirectOnRead = cmdServer.Flag.Bool("filer.redirectOnRead", false, "whether proxy or redirect to volume server during file GET request")filerOptions.disableDirListing = cmdServer.Flag.Bool("filer.disableDirListing", false, "turn off directory listing")filerOptions.maxMB = cmdServer.Flag.Int("filer.maxMB", 32, "split files larger than the limit")filerOptions.dirListingLimit = cmdServer.Flag.Int("filer.dirListLimit", 1000, "limit sub dir listing size")+ filerOptions.enableNotification = cmdServer.Flag.Bool("filer.notify", false, "send file updates to the queue defined in message_queue.toml")}func runServer(cmd *Command, args []string) bool {diff --git a/weed/filer2/entry_codec.go b/weed/filer2/entry_codec.goindex 671568b75c..baa6a9440c 100644--- a/weed/filer2/entry_codec.go+++ b/weed/filer2/entry_codec.go@@ -63,3 +63,25 @@ func PbToEntryAttribute(attr *filer_pb.FuseAttributes) Attr {return t}++func EqualEntry(a, b *Entry) bool {+ if a == b {+ return true+ }+ if a == nil && b != nil || a != nil && b == nil {+ return false+ }+ if !proto.Equal(EntryAttributeToPb(a), EntryAttributeToPb(b)) {+ return false+ }+ if len(a.Chunks) != len(b.Chunks) {+ return false+ }++ for i := 0; i < len(a.Chunks); i++ {+ if !proto.Equal(a.Chunks[i], b.Chunks[i]) {+ return false+ }+ }+ return true+}diff --git a/weed/filer2/filer.go b/weed/filer2/filer.goindex 823371a6b6..475e79a179 100644--- a/weed/filer2/filer.go+++ b/weed/filer2/filer.go@@ -90,6 +90,9 @@ func (f *Filer) CreateEntry(entry *Entry) error {if mkdirErr != nil {return fmt.Errorf("mkdir %s: %v", dirPath, mkdirErr)}++ f.NotifyUpdateEvent(nil, dirEntry)+} else if !dirEntry.IsDirectory() {return fmt.Errorf("%s is a file", dirPath)}@@ -122,6 +125,8 @@ func (f *Filer) CreateEntry(entry *Entry) error {return fmt.Errorf("insert entry %s: %v", entry.FullPath, err)}+ f.NotifyUpdateEvent(oldEntry, entry)+f.deleteChunksIfNotNew(oldEntry, entry)return nil@@ -170,6 +175,9 @@ func (f *Filer) DeleteEntryMetaAndData(p FullPath, isRecursive bool, shouldDeletreturn nil}glog.V(0).Infof("deleting entry %v", p)++ f.NotifyUpdateEvent(entry, nil)+return f.store.DeleteEntry(p)}diff --git a/weed/filer2/filer_notify.go b/weed/filer2/filer_notify.gonew file mode 100644index 0000000000..2ce45db0e1--- /dev/null+++ b/weed/filer2/filer_notify.go@@ -0,0 +1,38 @@+package filer2++import (+ "github.com/chrislusf/seaweedfs/weed/msgqueue"+ "github.com/chrislusf/seaweedfs/weed/pb/filer_pb"+)++func (f *Filer) NotifyUpdateEvent(oldEntry, newEntry *Entry) {+ var key string+ if oldEntry != nil {+ key = string(oldEntry.FullPath)+ } else if newEntry != nil {+ key = string(newEntry.FullPath)+ } else {+ return+ }++ msgqueue.Queue.SendMessage(+ key,+ &filer_pb.EventNotification{+ OldEntry: toProtoEntry(oldEntry),+ NewEntry: toProtoEntry(newEntry),+ },+ )++}++func toProtoEntry(entry *Entry) *filer_pb.Entry {+ if entry == nil {+ return nil+ }+ return &filer_pb.Entry{+ Name: string(entry.FullPath),+ IsDirectory: entry.IsDirectory(),+ Attributes: EntryAttributeToPb(entry),+ Chunks: entry.Chunks,+ }+}diff --git a/weed/msgqueue/configuration.go b/weed/msgqueue/configuration.gonew file mode 100644index 0000000000..63f103c1e3--- /dev/null+++ b/weed/msgqueue/configuration.go@@ -0,0 +1,82 @@+package msgqueue++import (+ "os"++ "github.com/chrislusf/seaweedfs/weed/glog"+ "github.com/spf13/viper"+)++const (+ MSG_QUEUE_TOML_EXAMPLE = `+# A sample TOML config file for SeaweedFS message queue++[log]+enabled = true++[kafka]+enabled = false+hosts = [+ "localhost:9092"+]+topic = "seaweedfs_filer"++`+)++var (+ MessageQueues []MessageQueue++ Queue MessageQueue+)++func LoadConfiguration() {++ // find a filer store+ viper.SetConfigName("message_queue") // name of config file (without extension)+ viper.AddConfigPath(".") // optionally look for config in the working directory+ viper.AddConfigPath("$HOME/.seaweedfs") // call multiple times to add many search paths+ viper.AddConfigPath("/etc/seaweedfs/") // path to look for the config file in+ if err := viper.ReadInConfig(); err != nil { // Handle errors reading the config file+ glog.Fatalf("Failed to load message_queue.toml file from current directory, or $HOME/.seaweedfs/, "++ "or /etc/seaweedfs/"++ "\n\nPlease follow this example and add a message_queue.toml file to "++ "current directory, or $HOME/.seaweedfs/, or /etc/seaweedfs/:\n"+MSG_QUEUE_TOML_EXAMPLE, err)+ }++ glog.V(0).Infof("Reading message queue configuration from %s", viper.ConfigFileUsed())+ for _, store := range MessageQueues {+ if viper.GetBool(store.GetName() + ".enabled") {+ viperSub := viper.Sub(store.GetName())+ if err := store.Initialize(viperSub); err != nil {+ glog.Fatalf("Failed to initialize store for %s: %+v",+ store.GetName(), err)+ }+ Queue = store+ glog.V(0).Infof("Configure message queue for %s from %s", store.GetName(), viper.ConfigFileUsed())+ return+ }+ }++ println()+ println("Supported message queues are:")+ for _, store := range MessageQueues {+ println(" " + store.GetName())+ }++ println()+ println("Please configure a supported message queue in", viper.ConfigFileUsed())+ println()++ os.Exit(-1)+}++// A simplified interface to decouple from Viper+type Configuration interface {+ GetString(key string) string+ GetBool(key string) bool+ GetInt(key string) int+ GetInt64(key string) int64+ GetFloat64(key string) float64+ GetStringSlice(key string) []string+}diff --git a/weed/msgqueue/kafka/kafka_queue.go b/weed/msgqueue/kafka/kafka_queue.gonew file mode 100644index 0000000000..c013baf5f4--- /dev/null+++ b/weed/msgqueue/kafka/kafka_queue.go@@ -0,0 +1,76 @@+package kafka++import (+ _ "github.com/go-sql-driver/mysql"+ "github.com/chrislusf/seaweedfs/weed/msgqueue"+ "github.com/golang/protobuf/proto"+ "github.com/Shopify/sarama"+ "github.com/chrislusf/seaweedfs/weed/glog"+)++func init() {+ msgqueue.MessageQueues = append(msgqueue.MessageQueues, &KafkaQueue{})+}++type KafkaQueue struct {+ topic string+ producer sarama.AsyncProducer+}++func (k *KafkaQueue) GetName() string {+ return "kafka"+}++func (k *KafkaQueue) Initialize(configuration msgqueue.Configuration) (err error) {+ return k.initialize(+ configuration.GetStringSlice("hosts"),+ configuration.GetString("topic"),+ )+}++func (k *KafkaQueue) initialize(hosts []string, topic string) (err error) {+ config := sarama.NewConfig()+ config.Producer.RequiredAcks = sarama.WaitForLocal+ config.Producer.Partitioner = sarama.NewHashPartitioner+ config.Producer.Return.Successes = true+ config.Producer.Return.Errors = true+ k.producer, err = sarama.NewAsyncProducer(hosts, config)+ go k.handleSuccess()+ go k.handleError()+ return nil+}++func (k *KafkaQueue) SendMessage(key string, message proto.Message) (err error) {+ bytes, err := proto.Marshal(message)+ if err != nil {+ return+ }++ msg := &sarama.ProducerMessage{+ Topic: k.topic,+ Key: sarama.StringEncoder(key),+ Value: sarama.ByteEncoder(bytes),+ }++ k.producer.Input() <- msg++ return nil+}++func (k *KafkaQueue) handleSuccess() {+ for {+ pm := <-k.producer.Successes()+ if pm != nil {+ glog.Infof("producer message success, partition:%d offset:%d key:%v valus:%s", pm.Partition, pm.Offset, pm.Key, pm.Value)+ }+ }+}++func (k *KafkaQueue) handleError() {+ for {+ err := <-k.producer.Errors()+ if err != nil {+ glog.Errorf("producer message error, partition:%d offset:%d key:%v valus:%s error(%v)", err.Msg.Partition, err.Msg.Offset, err.Msg.Key, err.Msg.Value, err.Err)+ }+ }+}diff --git a/weed/msgqueue/log/log_queue.go b/weed/msgqueue/log/log_queue.gonew file mode 100644index 0000000000..ef7967e6ce--- /dev/null+++ b/weed/msgqueue/log/log_queue.go@@ -0,0 +1,29 @@+package kafka++import (+ _ "github.com/go-sql-driver/mysql"+ "github.com/chrislusf/seaweedfs/weed/msgqueue"+ "github.com/golang/protobuf/proto"+ "github.com/chrislusf/seaweedfs/weed/glog"+)++func init() {+ msgqueue.MessageQueues = append(msgqueue.MessageQueues, &LogQueue{})+}++type LogQueue struct {+}++func (k *LogQueue) GetName() string {+ return "log"+}++func (k *LogQueue) Initialize(configuration msgqueue.Configuration) (err error) {+ return nil+}++func (k *LogQueue) SendMessage(key string, message proto.Message) (err error) {++ glog.V(0).Infof("%v: %+v", key, message)+ return nil+}diff --git a/weed/msgqueue/message_queue.go b/weed/msgqueue/message_queue.gonew file mode 100644index 0000000000..6d57b9b3b3--- /dev/null+++ b/weed/msgqueue/message_queue.go@@ -0,0 +1,11 @@+package msgqueue++import "github.com/golang/protobuf/proto"++type MessageQueue interface {+ // GetName gets the name to locate the configuration in message_queue.toml file+ GetName() string+ // Initialize initializes the file store+ Initialize(configuration Configuration) error+ SendMessage(key string, message proto.Message) error+}diff --git a/weed/pb/filer.proto b/weed/pb/filer.protoindex 1197d836e7..b7e95d2383 100644--- a/weed/pb/filer.proto+++ b/weed/pb/filer.proto@@ -65,6 +65,11 @@ message Entry {FuseAttributes attributes = 4;}+message EventNotification {+ Entry old_entry = 2;+ Entry new_entry = 3;+}+message FileChunk {string file_id = 1;int64 offset = 2;diff --git a/weed/pb/filer_pb/filer.pb.go b/weed/pb/filer_pb/filer.pb.goindex d70917709e..d3f14a7bf6 100644--- a/weed/pb/filer_pb/filer.pb.go+++ b/weed/pb/filer_pb/filer.pb.go@@ -14,6 +14,7 @@ It has these top-level messages:ListEntriesRequestListEntriesResponseEntry+ EventNotificationFileChunkFuseAttributesGetEntryAttributesRequest@@ -201,6 +202,38 @@ func (m *Entry) GetAttributes() *FuseAttributes {return nil}+type EventNotification struct {+ Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`+ OldEntry *Entry `protobuf:"bytes,2,opt,name=old_entry,json=oldEntry" json:"old_entry,omitempty"`+ NewEntry *Entry `protobuf:"bytes,3,opt,name=new_entry,json=newEntry" json:"new_entry,omitempty"`+}++func (m *EventNotification) Reset() { *m = EventNotification{} }+func (m *EventNotification) String() string { return proto.CompactTextString(m) }+func (*EventNotification) ProtoMessage() {}+func (*EventNotification) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }++func (m *EventNotification) GetName() string {+ if m != nil {+ return m.Name+ }+ return ""+}++func (m *EventNotification) GetOldEntry() *Entry {+ if m != nil {+ return m.OldEntry+ }+ return nil+}++func (m *EventNotification) GetNewEntry() *Entry {+ if m != nil {+ return m.NewEntry+ }+ return nil+}+type FileChunk struct {FileId string `protobuf:"bytes,1,opt,name=file_id,json=fileId" json:"file_id,omitempty"`Offset int64 `protobuf:"varint,2,opt,name=offset" json:"offset,omitempty"`@@ -211,7 +244,7 @@ type FileChunk struct {func (m *FileChunk) Reset() { *m = FileChunk{} }func (m *FileChunk) String() string { return proto.CompactTextString(m) }func (*FileChunk) ProtoMessage() {}-func (*FileChunk) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }+func (*FileChunk) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }func (m *FileChunk) GetFileId() string {if m != nil {@@ -257,7 +290,7 @@ type FuseAttributes struct {func (m *FuseAttributes) Reset() { *m = FuseAttributes{} }func (m *FuseAttributes) String() string { return proto.CompactTextString(m) }func (*FuseAttributes) ProtoMessage() {}-func (*FuseAttributes) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }+func (*FuseAttributes) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }func (m *FuseAttributes) GetFileSize() uint64 {if m != nil {@@ -338,7 +371,7 @@ type GetEntryAttributesRequest struct {func (m *GetEntryAttributesRequest) Reset() { *m = GetEntryAttributesRequest{} }func (m *GetEntryAttributesRequest) String() string { return proto.CompactTextString(m) }func (*GetEntryAttributesRequest) ProtoMessage() {}-func (*GetEntryAttributesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }+func (*GetEntryAttributesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }func (m *GetEntryAttributesRequest) GetName() string {if m != nil {@@ -369,7 +402,7 @@ type GetEntryAttributesResponse struct {func (m *GetEntryAttributesResponse) Reset() { *m = GetEntryAttributesResponse{} }func (m *GetEntryAttributesResponse) String() string { return proto.CompactTextString(m) }func (*GetEntryAttributesResponse) ProtoMessage() {}-func (*GetEntryAttributesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }+func (*GetEntryAttributesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }func (m *GetEntryAttributesResponse) GetAttributes() *FuseAttributes {if m != nil {@@ -392,7 +425,7 @@ type GetFileContentRequest struct {func (m *GetFileContentRequest) Reset() { *m = GetFileContentRequest{} }func (m *GetFileContentRequest) String() string { return proto.CompactTextString(m) }func (*GetFileContentRequest) ProtoMessage() {}-func (*GetFileContentRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }+func (*GetFileContentRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} }func (m *GetFileContentRequest) GetFileId() string {if m != nil {@@ -408,7 +441,7 @@ type GetFileContentResponse struct {func (m *GetFileContentResponse) Reset() { *m = GetFileContentResponse{} }func (m *GetFileContentResponse) String() string { return proto.CompactTextString(m) }func (*GetFileContentResponse) ProtoMessage() {}-func (*GetFileContentResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} }+func (*GetFileContentResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} }func (m *GetFileContentResponse) GetContent() []byte {if m != nil {@@ -425,7 +458,7 @@ type CreateEntryRequest struct {func (m *CreateEntryRequest) Reset() { *m = CreateEntryRequest{} }func (m *CreateEntryRequest) String() string { return proto.CompactTextString(m) }func (*CreateEntryRequest) ProtoMessage() {}-func (*CreateEntryRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} }+func (*CreateEntryRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} }func (m *CreateEntryRequest) GetDirectory() string {if m != nil {@@ -447,7 +480,7 @@ type CreateEntryResponse struct {func (m *CreateEntryResponse) Reset() { *m = CreateEntryResponse{} }func (m *CreateEntryResponse) String() string { return proto.CompactTextString(m) }func (*CreateEntryResponse) ProtoMessage() {}-func (*CreateEntryResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} }+func (*CreateEntryResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} }type UpdateEntryRequest struct {Directory string `protobuf:"bytes,1,opt,name=directory" json:"directory,omitempty"`@@ -457,7 +490,7 @@ type UpdateEntryRequest struct {func (m *UpdateEntryRequest) Reset() { *m = UpdateEntryRequest{} }func (m *UpdateEntryRequest) String() string { return proto.CompactTextString(m) }func (*UpdateEntryRequest) ProtoMessage() {}-func (*UpdateEntryRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} }+func (*UpdateEntryRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} }func (m *UpdateEntryRequest) GetDirectory() string {if m != nil {@@ -479,7 +512,7 @@ type UpdateEntryResponse struct {func (m *UpdateEntryResponse) Reset() { *m = UpdateEntryResponse{} }func (m *UpdateEntryResponse) String() string { return proto.CompactTextString(m) }func (*UpdateEntryResponse) ProtoMessage() {}-func (*UpdateEntryResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} }+func (*UpdateEntryResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} }type DeleteEntryRequest struct {Directory string `protobuf:"bytes,1,opt,name=directory" json:"directory,omitempty"`@@ -492,7 +525,7 @@ type DeleteEntryRequest struct {func (m *DeleteEntryRequest) Reset() { *m = DeleteEntryRequest{} }func (m *DeleteEntryRequest) String() string { return proto.CompactTextString(m) }func (*DeleteEntryRequest) ProtoMessage() {}-func (*DeleteEntryRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} }+func (*DeleteEntryRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} }func (m *DeleteEntryRequest) GetDirectory() string {if m != nil {@@ -535,7 +568,7 @@ type DeleteEntryResponse struct {func (m *DeleteEntryResponse) Reset() { *m = DeleteEntryResponse{} }func (m *DeleteEntryResponse) String() string { return proto.CompactTextString(m) }func (*DeleteEntryResponse) ProtoMessage() {}-func (*DeleteEntryResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} }+func (*DeleteEntryResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} }type AssignVolumeRequest struct {Count int32 `protobuf:"varint,1,opt,name=count" json:"count,omitempty"`@@ -548,7 +581,7 @@ type AssignVolumeRequest struct {func (m *AssignVolumeRequest) Reset() { *m = AssignVolumeRequest{} }func (m *AssignVolumeRequest) String() string { return proto.CompactTextString(m) }func (*AssignVolumeRequest) ProtoMessage() {}-func (*AssignVolumeRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} }+func (*AssignVolumeRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} }func (m *AssignVolumeRequest) GetCount() int32 {if m != nil {@@ -595,7 +628,7 @@ type AssignVolumeResponse struct {func (m *AssignVolumeResponse) Reset() { *m = AssignVolumeResponse{} }func (m *AssignVolumeResponse) String() string { return proto.CompactTextString(m) }func (*AssignVolumeResponse) ProtoMessage() {}-func (*AssignVolumeResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} }+func (*AssignVolumeResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} }func (m *AssignVolumeResponse) GetFileId() string {if m != nil {@@ -632,7 +665,7 @@ type LookupVolumeRequest struct {func (m *LookupVolumeRequest) Reset() { *m = LookupVolumeRequest{} }func (m *LookupVolumeRequest) String() string { return proto.CompactTextString(m) }func (*LookupVolumeRequest) ProtoMessage() {}-func (*LookupVolumeRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} }+func (*LookupVolumeRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{20} }func (m *LookupVolumeRequest) GetVolumeIds() []string {if m != nil {@@ -648,7 +681,7 @@ type Locations struct {func (m *Locations) Reset() { *m = Locations{} }func (m *Locations) String() string { return proto.CompactTextString(m) }func (*Locations) ProtoMessage() {}-func (*Locations) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{20} }+func (*Locations) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{21} }func (m *Locations) GetLocations() []*Location {if m != nil {@@ -665,7 +698,7 @@ type Location struct {func (m *Location) Reset() { *m = Location{} }func (m *Location) String() string { return proto.CompactTextString(m) }func (*Location) ProtoMessage() {}-func (*Location) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{21} }+func (*Location) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{22} }func (m *Location) GetUrl() string {if m != nil {@@ -688,7 +721,7 @@ type LookupVolumeResponse struct {func (m *LookupVolumeResponse) Reset() { *m = LookupVolumeResponse{} }func (m *LookupVolumeResponse) String() string { return proto.CompactTextString(m) }func (*LookupVolumeResponse) ProtoMessage() {}-func (*LookupVolumeResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{22} }+func (*LookupVolumeResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{23} }func (m *LookupVolumeResponse) GetLocationsMap() map[string]*Locations {if m != nil {@@ -704,7 +737,7 @@ type DeleteCollectionRequest struct {func (m *DeleteCollectionRequest) Reset() { *m = DeleteCollectionRequest{} }func (m *DeleteCollectionRequest) String() string { return proto.CompactTextString(m) }func (*DeleteCollectionRequest) ProtoMessage() {}-func (*DeleteCollectionRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{23} }+func (*DeleteCollectionRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{24} }func (m *DeleteCollectionRequest) GetCollection() string {if m != nil {@@ -719,7 +752,7 @@ type DeleteCollectionResponse struct {func (m *DeleteCollectionResponse) Reset() { *m = DeleteCollectionResponse{} }func (m *DeleteCollectionResponse) String() string { return proto.CompactTextString(m) }func (*DeleteCollectionResponse) ProtoMessage() {}-func (*DeleteCollectionResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{24} }+func (*DeleteCollectionResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{25} }func init() {proto.RegisterType((*LookupDirectoryEntryRequest)(nil), "filer_pb.LookupDirectoryEntryRequest")@@ -727,6 +760,7 @@ func init() {proto.RegisterType((*ListEntriesRequest)(nil), "filer_pb.ListEntriesRequest")proto.RegisterType((*ListEntriesResponse)(nil), "filer_pb.ListEntriesResponse")proto.RegisterType((*Entry)(nil), "filer_pb.Entry")+ proto.RegisterType((*EventNotification)(nil), "filer_pb.EventNotification")proto.RegisterType((*FileChunk)(nil), "filer_pb.FileChunk")proto.RegisterType((*FuseAttributes)(nil), "filer_pb.FuseAttributes")proto.RegisterType((*GetEntryAttributesRequest)(nil), "filer_pb.GetEntryAttributesRequest")@@ -1088,75 +1122,78 @@ var _SeaweedFiler_serviceDesc = grpc.ServiceDesc{func init() { proto.RegisterFile("filer.proto", fileDescriptor0) }var fileDescriptor0 = []byte{- // 1108 bytes of a gzipped FileDescriptorProto- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xb4, 0x57, 0x4f, 0x6f, 0xdc, 0x44,- 0x14, 0x8f, 0xd7, 0xbb, 0x9b, 0xf8, 0xed, 0xa6, 0xb4, 0xb3, 0x69, 0x6b, 0xb6, 0x49, 0xd9, 0x0e,- 0x2d, 0x4a, 0x05, 0x8a, 0xa2, 0xc0, 0x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0xc4, 0x76, 0x58, 0x37, 0x81, 0x74, 0x89, 0xfc, 0x04, 0xb7,+ 0xe7, 0x5b, 0x9a, 0x3c, 0x9c, 0x87, 0x55, 0x99, 0x94, 0x3e, 0xbd, 0xc9, 0xa4, 0x70, 0x7e, 0xd6,+ 0x56, 0x7f, 0x56, 0x5f, 0xfc, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x41, 0x0a, 0x10, 0x9d, 0x68, 0x0d,+ 0x00, 0x00,}diff --git a/weed/server/filer_grpc_server.go b/weed/server/filer_grpc_server.goindex 0f84cf5279..98e8699b0a 100644--- a/weed/server/filer_grpc_server.go+++ b/weed/server/filer_grpc_server.go@@ -173,6 +173,10 @@ func (fs *FilerServer) UpdateEntry(ctx context.Context, req *filer_pb.UpdateEntr}+ if filer2.EqualEntry(entry, newEntry) {+ return &filer_pb.UpdateEntryResponse{}, err+ }+if err = fs.filer.UpdateEntry(newEntry); err == nil {for _, garbage := range unusedChunks {glog.V(0).Infof("deleting %s old chunk: %v, [%d, %d)", fullpath, garbage.FileId, garbage.Offset, garbage.Offset+int64(garbage.Size))@@ -184,6 +188,8 @@ func (fs *FilerServer) UpdateEntry(ctx context.Context, req *filer_pb.UpdateEntr}}+ fs.filer.NotifyUpdateEvent(entry, newEntry)+return &filer_pb.UpdateEntryResponse{}, err}diff --git a/weed/server/filer_server.go b/weed/server/filer_server.goindex 61ca972cc5..c9dabe5cbe 100644--- a/weed/server/filer_server.go+++ b/weed/server/filer_server.go@@ -8,9 +8,12 @@ import (_ "github.com/chrislusf/seaweedfs/weed/filer2/mysql"_ "github.com/chrislusf/seaweedfs/weed/filer2/postgres"_ "github.com/chrislusf/seaweedfs/weed/filer2/redis"+ _ "github.com/chrislusf/seaweedfs/weed/msgqueue/kafka"+ _ "github.com/chrislusf/seaweedfs/weed/msgqueue/log""github.com/chrislusf/seaweedfs/weed/glog""github.com/chrislusf/seaweedfs/weed/security""net/http"+ "github.com/chrislusf/seaweedfs/weed/msgqueue")type FilerOption struct {@@ -23,6 +26,7 @@ type FilerOption struct {SecretKey stringDirListingLimit intDataCenter string+ EnableNotification bool}type FilerServer struct {@@ -46,6 +50,10 @@ func NewFilerServer(defaultMux, readonlyMux *http.ServeMux, option *FilerOption)fs.filer.LoadConfiguration()+ if fs.option.EnableNotification {+ msgqueue.LoadConfiguration()+ }+defaultMux.HandleFunc("/favicon.ico", faviconHandler)defaultMux.HandleFunc("/", fs.filerHandler)if defaultMux != readonlyMux {