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
fix(precompute): port wall-clock grace fallback from backend to close idle windows
Sync the precompute-engine window-closing fix from ASAPQuery-backend.
Problem: with strict event-time semantics, a tumbling window [T, T+size)
only closes when the watermark reaches T+size. For a one-shot batch ingest
where every record carries (nearly) the same timestamp, the watermark
freezes and flush_all's +1ms advance is a no-op, so the trailing window
never closes — emit_batch is never called and the store stays empty even
though data was ingested.
Fix (ported from the backend's flush_all "sweep blocker #2" fallback):
track each pane's wall-clock birth time and, in flush_all, force the
effective watermark past pane_start + window_size_ms for any pane that has
been alive longer than window_size_ms + wall_clock_grace_period_ms of
wall-clock time, regardless of event-time. Set wall_clock_grace_period_ms
<= 0 to opt out and keep strict event-time-only semantics.
Changes:
- config: add wall_clock_grace_period_ms (serde default 5000ms)
- worker: GroupState.pane_wall_clock_starts_ms + prune; injectable now_ms_fn
(default SystemTime::now, test override via set_now_ms_fn); record pane
birth in process_group_samples; wall-clock fallback in flush_all
- engine/main/CLI: thread the setting through (PrecomputeSettings +
--wall-clock-grace-period-ms flag)
- tests: wall_clock_fallback_closes_idle_window and the grace=0 opt-out;
update existing config literals
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments