diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-05-08 02:47:22 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-05-08 02:47:22 -0700 |
| commit | dfccc3c2637693dce141c27a321ba5d3aea1ace9 (patch) | |
| tree | 9d7bce6ec9f93c563c1086f4b7460279d6527d37 /weed/util/log_buffer/log_read.go | |
| parent | a8bc8eb351743ffa5032f1c65b8997b4636d67f2 (diff) | |
| download | seaweedfs-dfccc3c2637693dce141c27a321ba5d3aea1ace9.tar.xz seaweedfs-dfccc3c2637693dce141c27a321ba5d3aea1ace9.zip | |
able to read chan and write chan
Diffstat (limited to 'weed/util/log_buffer/log_read.go')
| -rw-r--r-- | weed/util/log_buffer/log_read.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/weed/util/log_buffer/log_read.go b/weed/util/log_buffer/log_read.go index 6339d9d77..a2345acfb 100644 --- a/weed/util/log_buffer/log_read.go +++ b/weed/util/log_buffer/log_read.go @@ -12,8 +12,9 @@ import ( ) func (logBuffer *LogBuffer) LoopProcessLogData( - startTreadTime time.Time, waitForDataFn func() bool, - eachLogDataFn func(logEntry *filer_pb.LogEntry) error) (processed int64, err error) { + startTreadTime time.Time, + waitForDataFn func() bool, + eachLogDataFn func(logEntry *filer_pb.LogEntry) error) (err error) { // loop through all messages var bytesBuf *bytes.Buffer lastReadTime := startTreadTime @@ -66,7 +67,6 @@ func (logBuffer *LogBuffer) LoopProcessLogData( pos += 4 + int(size) batchSize++ - processed++ } // fmt.Printf("sent message ts[%d,%d] size %d\n", startReadTime.UnixNano(), lastReadTime.UnixNano(), batchSize) |
