spec-5.50: CR read-path profile (measure-only harness + TAP) — DRAFT pre-merge CI evidence, do not merge#9
Draft
sqlrush wants to merge 7 commits into
Draft
spec-5.50: CR read-path profile (measure-only harness + TAP) — DRAFT pre-merge CI evidence, do not merge#9sqlrush wants to merge 7 commits into
sqlrush wants to merge 7 commits into
Conversation
added 7 commits
June 24, 2026 00:00
…nominator) Cross-backend / cross-worker CR construction redundancy from counter deltas: redundancy = construct_delta / distinct_cr_keys (the exact 5-field CR key, never distinct_blocks). Rows with unproven key stability (key_stable != 1) or zero distinct keys read INCONCLUSIVE and never feed the value gate. Pure post-processing: no DB, no product code, no catalog. --self-test runs the U3 math cases (7/7) with no cluster. Spec: spec-5.50-cr-read-path-profile.md
…elta Sample the 17 CR counters already exposed by the shipped pg_cluster_state SRF (category='cr') and compute pre/post deltas. Reuses the existing SRF only: no new SRF/view/column, so catversion does not bump. sample mode fails loud if the cr row count is not 17 (enable-cluster off / drift). --self-test covers the delta join math with no DB. Spec: spec-5.50-cr-read-path-profile.md
t/291: single cluster-enabled node, cr_gate_no_peer_fastpath=off, same-node own-instance CR (not by-construction). L1 proves real undo-chain CR (chain_walk>0). L2 axis A: N independent readers share read_scn (proven via cluster_scn_current; exported-snapshot import fail-closes in cluster mode), cross-backend construct redundancy ~= N, base_page_lsn settles after warm-up (dedup-able steady state). L3 axis B: deeper chain costs more walk + cache evict thrash. L4 axis C: parallel workers inherit leader read_scn, seqscan mutual-exclusion redundancy ~= 1. L5 base_page_lsn over-miss. L6 resolver live-slot shortcut characterisation. L7 FX2 single-node real chains. L8 measure-only guard (no corruption, no cross-instance leak). Perf tier, not fast-gate. No product code, no catalog. Spec: spec-5.50-cr-read-path-profile.md
Self-contained perf-tier driver: brings up a single cluster-enabled node (cr_gate_no_peer_fastpath=off, own-instance CR), drives axis A (SELECT-heavy cross-backend redundancy via staggered snapshot-sharing readers), axis B (long-snapshot deep chain-walk cost), axis C (parallel-scan mutual-exclusion), samples the 17 cr counters pre/post + wall time, emits CSV and runs cr-redundancy-calc. REPORT-ONLY: absolute timings only meaningful on a clean Linux release build (perf workflow); redundancy ratios are build-invariant. No product code, no catalog. Spec: spec-5.50-cr-read-path-profile.md
Add a warn-only Linux step running scripts/perf/run-cr-profile.sh against the candidate install, collected as a perf artifact. Perf tier only (not fast-gate, not a nightly correctness shard; t/291 runs via local make check + here). Build-invariant counter deltas / redundancy are meaningful; absolute wall is cassert-inflated trend (perf.yml is all-cassert). Spec: spec-5.50-cr-read-path-profile.md
…5.8 collision) Session B (spec-5.8) reserves t/291 for the LMD cross-node deadlock 2-node test. Move the CR read-path profile to the 300-block (CR Read-Path band 5.50-5.58 -> t/300+), clear of the deadlock band's 29x range. Perf tier, runs via local make check + perf workflow (not a nightly correctness shard). Spec: spec-5.50-cr-read-path-profile.md
fast-gate comment-headers check requires 'Author: SqlRush' on newly-added cluster TAP files. Add the header block to t/300_cluster_5_50_cr_profile.pl. Spec: spec-5.50-cr-read-path-profile.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DRAFT — pre-merge fast-gate evidence only. DO NOT MERGE, DO NOT TAG.
spec-5.50 (Stage 5.5 CR read-path profile), measure-only: adds a CR read-path profile harness + a real own-instance CR-path TAP. Zero product code, zero catalog (catversion unchanged) — diff is
scripts/perf/*+cluster_tap/t/300+perf.ymlonly.scripts/perf/cr-redundancy-calc.{sh,awk}— CR construction redundancy calc (self-test 7/7)scripts/perf/cr-counter-sample.sh— pg_cluster_state CR counter sampler + delta (self-test 2/2)scripts/perf/run-cr-profile.sh— self-contained 3-axis profile driversrc/test/cluster_tap/t/300_cluster_5_50_cr_profile.pl— real own-instance CR path (19/19).github/workflows/perf.yml— warn-only Linux profile step (perf tier, not fast-gate)Local verification: cluster_unit 106/106, t/300 19/19, harness self-tests 9/9. The Validate jobs comment-headers + format checks pass.
NOTE on red CI: the
Validatejob is red due to a pre-existing CI issue unrelated to this change — the commit-message lint runsgit log -1on thepull_requestsynthetic merge commit ("Merge X into Y"), which never matches the conventional-commit pattern, so it blocks the dependent build/test jobs. On a normal push-to-main (the real merge path) the lint sees the real commit and passes. Tracked as a separate main-side CI hardening item; intentionally NOT fixed from this measure-only branch.Merge is intentionally deferred behind the Stage 5 deadlock-band release order; final merge will rebase onto then-current main and re-run the gates via push (not PR), per CI policy.
Spec: spec-5.50-cr-read-path-profile.md