mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 19:13:34 +00:00
fix(logs): print logs with zero timestamps immediately to prevent indefinite stalling
This commit is contained in:
@@ -186,6 +186,13 @@ func (m *LogMerger) run() {
|
||||
e.stream.lastSeen = e.entry.Timestamp
|
||||
}
|
||||
if e.entry.Stream == api.LogStreamStdout || e.entry.Stream == api.LogStreamStderr {
|
||||
// Forward log entries with unparseable timestamps immediately. Without a timestamp we can't place
|
||||
// them on the merged timeline, and buffering them would stall the watermark.
|
||||
if e.entry.Timestamp.IsZero() {
|
||||
m.output <- e.entry
|
||||
<-e.stream.semaphore
|
||||
continue
|
||||
}
|
||||
heap.Push(&m.queue, queuedEntry{entry: e.entry, semaphore: e.stream.semaphore})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user