Skip to content

Commit

Permalink
fix: bug in proactive rescheduling not accounting for future timeout (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Kishan Sairam Adapa authored Oct 18, 2023
1 parent 3939ffc commit 2ca25ad
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,12 @@ public void process(Record<TraceIdentity, RawSpan> record) {
traceEmitPunctuator.scheduleTask(currentTimeMs, key);
} else {
traceState.getSpanIds().add(spanId);
long prevScheduleTimestamp = traceState.getTraceEndTimestamp();
long prevScheduleTimestamp = traceState.getTraceEndTimestamp() + groupingWindowTimeoutMs;
traceState.setTraceEndTimestamp(currentTimeMs);
if (!traceEmitPunctuator.rescheduleTask(
prevScheduleTimestamp, currentTimeMs + groupingWindowTimeoutMs, key)) {
logger.debug(
"Failed to reschedule task on getting span for trace key {}, schedule already dropped!",
"Failed to proactively reschedule task on getting span for trace key {}, schedule already dropped!",
key);
}
}
Expand Down

0 comments on commit 2ca25ad

Please sign in to comment.