Compare commits

...

1 Commits

Author SHA1 Message Date
Claude
23d436aec6 fix: propagate isGreen through dedup flush to support windowed aggregation
dedupAggrShard.flush always forwarded samples with isGreen=false,
preventing windowed aggregation (enable_windows) from working when
dedup_interval is enabled. The green window state was never populated,
so late samples could be attributed to the wrong interval.

Pass ctx.isGreen instead of hardcoded false to the aggrPushFunc callback.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-04-13 13:02:23 +00:00

View File

@@ -258,11 +258,11 @@ func (das *dedupAggrShard) flush(ctx *dedupFlushCtx, f aggrPushFunc) {
// Limit the number of samples per each flush in order to limit memory usage.
if len(dstSamples) >= 10_000 {
f(dstSamples, ctx.deleteDeadline, false)
f(dstSamples, ctx.deleteDeadline, ctx.isGreen)
clear(dstSamples)
dstSamples = dstSamples[:0]
}
}
f(dstSamples, ctx.deleteDeadline, false)
f(dstSamples, ctx.deleteDeadline, ctx.isGreen)
ctx.samples = dstSamples
}