diff options
| author | chrislu <chris.lu@gmail.com> | 2025-10-24 00:49:14 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2025-10-24 00:49:14 -0700 |
| commit | d220875ef4601e74b6ab49e47f8e2dd36510482c (patch) | |
| tree | a3e89ee024f2c9383b36ff5470bff35238f49f03 /weed/util/log_buffer/log_read.go | |
| parent | 64a4ce93580258b8d5537416dfb5d9a1a8f14ee2 (diff) | |
| download | seaweedfs-d220875ef4601e74b6ab49e47f8e2dd36510482c.tar.xz seaweedfs-d220875ef4601e74b6ab49e47f8e2dd36510482c.zip | |
Revert "fix reading"
This reverts commit 64a4ce93580258b8d5537416dfb5d9a1a8f14ee2.
Diffstat (limited to 'weed/util/log_buffer/log_read.go')
| -rw-r--r-- | weed/util/log_buffer/log_read.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/weed/util/log_buffer/log_read.go b/weed/util/log_buffer/log_read.go index 950604022..3b7b99ada 100644 --- a/weed/util/log_buffer/log_read.go +++ b/weed/util/log_buffer/log_read.go @@ -270,7 +270,7 @@ func (logBuffer *LogBuffer) LoopProcessLogDataWithOffset(readerName string, star return } - // If we're reading offset-based and there's no data in LogBuffer, + // CRITICAL FIX: If we're reading offset-based and there's no data in LogBuffer, // return ResumeFromDiskError to let Subscribe try reading from disk again. // This prevents infinite blocking when all data is on disk (e.g., after restart). if startPosition.IsOffsetBased { @@ -355,6 +355,7 @@ func (logBuffer *LogBuffer) LoopProcessLogDataWithOffset(readerName string, star continue } + glog.V(4).Infof("Unmarshaled log entry %d: TsNs=%d, Offset=%d, Key=%s", batchSize+1, logEntry.TsNs, logEntry.Offset, string(logEntry.Key)) // Handle offset-based filtering for offset-based start positions @@ -376,7 +377,7 @@ func (logBuffer *LogBuffer) LoopProcessLogDataWithOffset(readerName string, star // println("stopTsNs", stopTsNs, "logEntry.TsNs", logEntry.TsNs) return } - // Use logEntry.Offset + 1 to move PAST the current entry + // CRITICAL FIX: Use logEntry.Offset + 1 to move PAST the current entry // This prevents infinite loops where we keep requesting the same offset lastReadPosition = NewMessagePosition(logEntry.TsNs, logEntry.Offset+1) |
