diff options
| author | chrislu <chris.lu@gmail.com> | 2024-03-16 10:52:47 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2024-03-16 10:52:47 -0700 |
| commit | f8957b84c1eb1905a44214ebc7ea3c7e1dcab4dd (patch) | |
| tree | 748bc3b6d617ce2707c68699101188b6709f010f | |
| parent | 529fa8c4c86170b8a2b581bf4e84471e45cc858d (diff) | |
| download | seaweedfs-f8957b84c1eb1905a44214ebc7ea3c7e1dcab4dd.tar.xz seaweedfs-f8957b84c1eb1905a44214ebc7ea3c7e1dcab4dd.zip | |
rename to LastTsNs
| -rw-r--r-- | weed/util/log_buffer/log_buffer.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/weed/util/log_buffer/log_buffer.go b/weed/util/log_buffer/log_buffer.go index 64abc67ff..4d393d88b 100644 --- a/weed/util/log_buffer/log_buffer.go +++ b/weed/util/log_buffer/log_buffer.go @@ -44,7 +44,7 @@ type LogBuffer struct { notifyFn func() isStopping *atomic.Bool flushChan chan *dataToFlush - lastTsNs int64 + LastTsNs int64 sync.RWMutex } @@ -89,12 +89,12 @@ func (logBuffer *LogBuffer) AddToBuffer(partitionKey, data []byte, processingTsN } else { ts = time.Unix(0, processingTsNs) } - if logBuffer.lastTsNs >= processingTsNs { + if logBuffer.LastTsNs >= processingTsNs { // this is unlikely to happen, but just in case - processingTsNs = logBuffer.lastTsNs + 1 + processingTsNs = logBuffer.LastTsNs + 1 ts = time.Unix(0, processingTsNs) } - logBuffer.lastTsNs = processingTsNs + logBuffer.LastTsNs = processingTsNs logEntry := &filer_pb.LogEntry{ TsNs: processingTsNs, PartitionKeyHash: util.HashToInt32(partitionKey), |
