aboutsummaryrefslogtreecommitdiff
path: root/weed
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-10-22 00:35:46 -0700
committerChris Lu <chris.lu@gmail.com>2020-10-22 00:35:48 -0700
commit5179e559f74cf7aed562f785e40bef46da3191bf (patch)
tree26660bfa427a22d1ba08ef9a0e8eb862dd252c16 /weed
parentde044e466ed02c9098c015f765134a98bab29d8e (diff)
downloadseaweedfs-5179e559f74cf7aed562f785e40bef46da3191bf.tar.xz
seaweedfs-5179e559f74cf7aed562f785e40bef46da3191bf.zip
skip empty logs
Diffstat (limited to 'weed')
-rw-r--r--weed/filer/filer_notify.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/weed/filer/filer_notify.go b/weed/filer/filer_notify.go
index 8719cf5b5..40755e6a7 100644
--- a/weed/filer/filer_notify.go
+++ b/weed/filer/filer_notify.go
@@ -83,6 +83,10 @@ func (f *Filer) logMetaEvent(ctx context.Context, fullpath string, eventNotifica
func (f *Filer) logFlushFunc(startTime, stopTime time.Time, buf []byte) {
+ if len(buf) == 0 {
+ return
+ }
+
startTime, stopTime = startTime.UTC(), stopTime.UTC()
targetFile := fmt.Sprintf("%s/%04d-%02d-%02d/%02d-%02d.segment", SystemLogDir,