Skip to content

🐛 fix(metrics): commit snapshots in one transaction - #1856

Merged
gaborbernat merged 2 commits into
mainfrom
fix/metrics-checkpoint-1403
Aug 30, 2026
Merged

gaborbernat merged 2 commits into
mainfrom
fix/metrics-checkpoint-1403

Conversation

@gaborbernat

Copy link
Copy Markdown
Member

Peryx committed lifetime totals before daily buckets. A storage failure between those commits produced snapshots from different event frontiers, which a restart loaded as one state.

The metrics store accepts each pair as one checkpoint. Peryx commits both keys in one redb write transaction and loads them through one redb snapshot read. The aggregator keeps a failed checkpoint pending for the next flush.

Closes #1403

Peryx used separate redb commits for lifetime totals and daily buckets. A
failure between commits left the snapshots at different event frontiers.

Use one redb write transaction for both snapshots and one read transaction when
loading them. Keep a failed checkpoint pending for the next flush.

Refs #1403
@gaborbernat gaborbernat added the bug Something isn't working label Aug 29, 2026
@gaborbernat gaborbernat self-assigned this Aug 29, 2026
@codspeed

codspeed Bot commented Aug 29, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 23 untouched benchmarks
⏩ 139 skipped benchmarks1


Comparing fix/metrics-checkpoint-1403 (949adf3) with main (60698d6)

Open in CodSpeed

Footnotes

  1. 139 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@gaborbernat
gaborbernat merged commit 34cf5a1 into main Aug 30, 2026
32 checks passed
@gaborbernat
gaborbernat deleted the fix/metrics-checkpoint-1403 branch August 30, 2026 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Keep metrics checkpoints pending until both snapshots commit

1 participant