Skip to content

fix(precompute): keep wall-clock fallback from force-closing panes still under active ingest - #536

Open
milindsrivastava1997 wants to merge 2 commits into
mainfrom
474-fixprecompute-bulk-single-timestamp-ingest-silently-drops-rows-when-wall-clock-fallback-closes-the-window-mid-ingest-1
Open

fix(precompute): keep wall-clock fallback from force-closing panes still under active ingest#536
milindsrivastava1997 wants to merge 2 commits into
mainfrom
474-fixprecompute-bulk-single-timestamp-ingest-silently-drops-rows-when-wall-clock-fallback-closes-the-window-mid-ingest-1

Conversation

@milindsrivastava1997

Copy link
Copy Markdown
Contributor

Summary

  • The wall-clock fallback in flush_all() aged a pane by time-since-first-touch, never refreshed. A bulk load whose rows all share one event-time (so the watermark never advances) that takes longer than window_size_ms + wall_clock_grace_period_ms to ingest got its window force-closed mid-ingest, silently dropping every row that arrived afterward (uniform undercount across every group key). Fixes fix(precompute): bulk single-timestamp ingest silently drops rows when wall-clock fallback closes the window mid-ingest #474.
  • Refreshes 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_mspane_wall_clock_last_touch_ms (+ its prune helper) to match the corrected semantics, and updated the doc comments that described the old birth-time behavior.

First of a 3-PR stack; this one is the minimal, self-contained bug fix and can ship on its own. #2 and #3 add e2e test infrastructure on top.

Test plan

  • New unit test wall_clock_fallback_does_not_close_a_pane_still_receiving_samples, verified red against the pre-fix or_insert semantics before restoring the fix.
  • Full precompute_engine:: unit suite (81 tests) passes.
  • Existing e2e_netflow_single_second and e2e_precompute_equivalence e2e tests pass.
  • cargo clippy -p query_engine_rust --lib --tests clean.

🤖 Generated with Claude Code

…ill 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>
…k-single-timestamp-ingest-silently-drops-rows-when-wall-clock-fallback-closes-the-window-mid-ingest-1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(precompute): bulk single-timestamp ingest silently drops rows when wall-clock fallback closes the window mid-ingest

1 participant