You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9a018cb
Browse filesBrowse the repository at this point in the historyBrowse files
fix(precompute): keep wall-clock fallback from force-closing panes still under active ingest (#536)
* fix(precompute): keep wall-clock fallback from force-closing panes still under active ingest
The wall-clock fallback in flush_all() ages a pane using the wall-clock time
it was first touched, never refreshed. A bulk load whose rows all share one
event-time (so the event-time watermark never advances) that takes longer
than window_size_ms + wall_clock_grace_period_ms to ingest therefore gets
its window force-closed mid-ingest, and every sample arriving afterward is
silently dropped by the (hardcoded) late-data path — a uniform undercount
across every group key (#474).
Refresh the pane's wall-clock bookkeeping on every touch instead of only the
first, so the fallback measures idle time, not age since birth: a pane still
receiving samples is never force-closed no matter how long it's been open,
only a pane nothing has touched in a while is. Renamed
pane_wall_clock_starts_ms -> pane_wall_clock_last_touch_ms (and its prune
helper) to match, and updated the doc comments describing the old
birth-time semantics.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* test(precompute): correctly interleave the mid-ingest flush in the still-active-pane test
wall_clock_fallback_does_not_close_a_pane_still_receiving_samples ran all 8
touches before either flush_all() call, so the "mid-ingest" check never
actually sat between two touches in wall-clock terms. Restructured to do 7
touches, the mid-ingest flush check, then the 8th touch, then the final
flush -- so the check genuinely exercises "still receiving samples" instead
of comparing against an already-completed touch. Also documents why no
absolute wall-clock ceiling is enforced on a pane's lifetime (deferred by
design, not an oversight).
Interleaving the flush for real exposed a second, unrelated bug in the test
helper: every flush_all() call unconditionally nudges the event-time
watermark forward by 1ms (the "boundary advance" that lets an idle stream
make progress), independent of the wall-clock fallback. With
allowed_lateness_ms=0, that 1ms of drift alone marked the 8th touch "late"
and dropped it via a wholly different code path. Set to 1 -- the exact
amount one intervening flush contributes, not an arbitrary buffer.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
0 commit comments