mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-19 17:17:57 +08:00
add filer notification
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user