Skip to content

fix: avoid stale rollup reads - #123

Closed
NikolayS wants to merge 2 commits into
mainfrom
release/fix-stale-rollup-source-122
Closed

fix: avoid stale rollup reads#123
NikolayS wants to merge 2 commits into
mainfrom
release/fix-stale-rollup-source-122

Conversation

@NikolayS

Copy link
Copy Markdown
Owner

What changed

  • adds a behavioral regression for a greater-than-one-hour window where raw samples cover the requested window but rollup_1m stops after its first minute
  • makes ash._pick_source_agg() require the rollup watermark to reach until when raw covers since
  • preserves the existing partial-rollup fallback when raw cannot answer the window start

Why

The 2.0 aggregate readers selected rollup_1m from its retention start alone. If the rollup worker lagged or stopped, the readers returned plausible but incomplete values and omitted newer raw load.

This is a release-candidate SQL correction on a release/* branch because the beta installer is already stamped under sql/.

Impact

The correction applies to the new aggregate surface that delegates to _pick_source_agg(): aas, timeline, periods, non-tie top, and chart.

Validation

  • RED on Postgres 18 at 54362ff: stale rollup must fall back to raw, got rollup_1m
  • GREEN on Postgres 18 at 6123780: exact source, covered-minute, and backend-second assertions pass
  • fresh install and full installer re-apply with ON_ERROR_STOP=1 pass
  • git diff --check main...HEAD passes

Closes #122

@NikolayS

Copy link
Copy Markdown
Owner Author

Superseded by #199, which keeps stale wide rollup reads honest without losing the healthy rounded-up dashboard fast path and landed on current main as 9efad9c. Closing this earlier attempt in favor of that successor; issue #122 remains open for the explicitly unclaimed older-than-physical-raw completeness case.

@NikolayS NikolayS closed this Jul 27, 2026
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.

Bug: 2.0 readers prefer a stale rollup over complete raw data

1 participant