From b9b613a78e2832565e0ec6fc703e3cd4e066ee16 Mon Sep 17 00:00:00 2001 From: Neo Date: Wed, 1 Feb 2023 10:56:11 +0800 Subject: [PATCH] filter system log dir does not make subscribe event (#4172) --- weed/filer/filer.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/weed/filer/filer.go b/weed/filer/filer.go index 07d40acc8..f6f06d9b2 100644 --- a/weed/filer/filer.go +++ b/weed/filer/filer.go @@ -3,14 +3,15 @@ package filer import ( "context" "fmt" - "github.com/seaweedfs/seaweedfs/weed/cluster" - "github.com/seaweedfs/seaweedfs/weed/pb" - "github.com/seaweedfs/seaweedfs/weed/pb/master_pb" "os" "sort" "strings" "time" + "github.com/seaweedfs/seaweedfs/weed/cluster" + "github.com/seaweedfs/seaweedfs/weed/pb" + "github.com/seaweedfs/seaweedfs/weed/pb/master_pb" + "google.golang.org/grpc" "github.com/seaweedfs/seaweedfs/weed/glog" @@ -254,7 +255,9 @@ func (f *Filer) ensureParentDirectoryEntry(ctx context.Context, entry *Entry, di return fmt.Errorf("mkdir %s: %v", dirPath, mkdirErr) } } else { - f.NotifyUpdateEvent(ctx, nil, dirEntry, false, isFromOtherCluster, nil) + if !strings.HasPrefix("/"+util.Join(dirParts[:]...), SystemLogDir) { + f.NotifyUpdateEvent(ctx, nil, dirEntry, false, isFromOtherCluster, nil) + } } } else if !dirEntry.IsDirectory() {