Repository navigation
fix(history): keep absorbed Parquet summaries in exports - #1566
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 66975dbbd1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // those in stored-resolution exports with their count and envelope. | ||
| if s.seriesHoursReady() { | ||
| summaries := make(map[int64]*seriesBucketAcc) | ||
| if err := s.addSummaryOnlySeriesBuckets(ctx, coldDir, driver, metric, since, until, 1, summaries); err != nil { |
There was a problem hiding this comment.
Preserve summaries across mixed archive windows
When a points=0 export spans an absorbed day plus any retained Parquet or aggregate file, this newly added call still omits every absorbed summary: addSummaryOnlySeriesBuckets returns immediately if either path lookup finds even one file anywhere in the requested interval, regardless of its day, driver, or metric. This occurs naturally when AbsorbColdHistory retains one unsummarized or changed sample day, and it makes a broad export silently lose all otherwise valid ts_series_hour history; source-file overlap needs to be excluded per hour/series rather than disabling summary loading for the whole request.
Useful? React with 👍 / 👎.
After Core absorbed a legacy Parquet file,
/api/serieswithpoints=0returned no points after restart. The hourly summaries and file receipt still existed in SQLite. The export branch read raw files and current buckets but skipped summary-only hours.Stored-resolution exports now use the same summary reader as downsampled queries. They retain the hourly resolution, count, mean and extremes, and leave unknown first/last evidence unset. Existing source checks avoid counting retained files or raw/aggregate rows twice. The point limit also bounds the new summary allocation.
Validation: a real Parquet regression fails before the fix and passes after cleanup and two starts. It checks JSON-style stored points, the sample reader, honest resolution and no duplicate data while the original file exists. Nearby archive/hourly tests and
make verifypass. The clean ARM64 build passed 28 checks for 2.3.2 and 28 for 3.8 sources: same and relocated directories, two starts, JSON/CSV Parquet exports, original charts, active settings, credentials, goals, identity, live writes, immutable source/archive and revert. The source uses old-Core SQLite data plus synthetic real legacy Parquet rows. A separate helper test also passed SIGKILL during partial extraction, retry and revert; activation-phase power loss and full installation cutover remain unqualified.Refs #1564. General migration and field qualification remain blocked; this needs a new exact beta and 48-hour trial with the other approved fixes.