Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg/stanza: use ObservedTimestamp to decide if flush log for recombine operator #11433

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix(pkg/stanza/operator/transformer/recombine): use ObservedTimestamp…
… to decide if flush log

Signed-off-by: Dominik Rosiek <[email protected]>
  • Loading branch information
Dominik Rosiek committed Jun 22, 2022
commit 70fd8970c3cfd983464421a305613d05e0645848
2 changes: 1 addition & 1 deletion pkg/stanza/operator/transformer/recombine/recombine.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func (r *Transformer) flushLoop() {
r.Lock()
timeNow := time.Now()
for source, entries := range r.batchMap {
lastEntryTs := entries[len(entries)-1].Timestamp
lastEntryTs := entries[len(entries)-1].ObservedTimestamp
timeSinceLastEntry := timeNow.Sub(lastEntryTs)
if timeSinceLastEntry < r.forceFlushTimeout {
continue
Expand Down