aboutsummaryrefslogtreecommitdiff
path: root/weed/filer/filer_notify.go
diff options
context:
space:
mode:
authorhilimd <68371223+hilimd@users.noreply.github.com>2020-10-22 15:50:49 +0800
committerGitHub <noreply@github.com>2020-10-22 15:50:49 +0800
commitcf7a1c722fa82fa78c546f68e4814fff7dc6d1e2 (patch)
tree1470a0d158a31b516e02202c004dfb413a29e186 /weed/filer/filer_notify.go
parentab1105c52472946efab9713bf15df45e14ff4514 (diff)
parent5179e559f74cf7aed562f785e40bef46da3191bf (diff)
downloadseaweedfs-cf7a1c722fa82fa78c546f68e4814fff7dc6d1e2.tar.xz
seaweedfs-cf7a1c722fa82fa78c546f68e4814fff7dc6d1e2.zip
Merge pull request #32 from chrislusf/master
sync
Diffstat (limited to 'weed/filer/filer_notify.go')
-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,