From c764596f96545c28793de6dd7e930fe0919584fb Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sun, 27 Jun 2021 05:54:06 -0700 Subject: [PATCH] filer: slow metadata topic read may lose some change events fix https://github.com/chrislusf/seaweedfs/issues/2117 --- weed/util/log_buffer/log_buffer.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/weed/util/log_buffer/log_buffer.go b/weed/util/log_buffer/log_buffer.go index e3153fddd..12840a88a 100644 --- a/weed/util/log_buffer/log_buffer.go +++ b/weed/util/log_buffer/log_buffer.go @@ -164,6 +164,10 @@ func (m *LogBuffer) copyToFlush() *dataToFlush { stopTime: m.stopTime, data: copiedBytes(m.buf[:m.pos]), } + // glog.V(4).Infof("%s flushing [0,%d) with %d entries [%v, %v]", m.name, m.pos, len(m.idx), m.startTime, m.stopTime) + } else { + // glog.V(4).Infof("%s removed from memory [0,%d) with %d entries [%v, %v]", m.name, m.pos, len(m.idx), m.startTime, m.stopTime) + m.lastFlushTime = m.stopTime } m.buf = m.prevBuffers.SealBuffer(m.startTime, m.stopTime, m.buf, m.pos) m.pos = 0