Skip to content

Commit 0d486d7

Browse files
author
SqlRush
committed
test(cluster): reground stale TAP baselines to runtime (block-format + injection count)
Two pre-existing baseline staleness items surfaced while landing spec-5.55 and rebasing onto current origin/main; both regrounded to the shipped runtime (no code change): 1. Heap-page special area = CLUSTER_ITL_SPECIAL_SIZE (392 = 384-byte ITL slot array + 8-byte ClusterItlPageHeader recycle watermark) since spec-3.10 §v0.5 (31b1724): PageInitHeapPage reserves 392, pd_special = BLCKSZ-392 = 7800, PageGetSpecialSize = 392. t/021 L6 and t/022 L7/L20 still asserted the pre-v0.5 384/7808 values. 2. spec-5.13 Hardening v1.0.3 added injection point cluster-clean-leave-survivor-suppress-preflight-ack (registry 138 -> 139) and updated t/015 but not t/017; t/017 inject .fault_type/.hits counts regrounded 138 -> 139.
1 parent 5cc307c commit 0d486d7

3 files changed

Lines changed: 13 additions & 13 deletions

File tree

src/test/cluster_tap/t/017_debug.pl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,15 @@
123123
'postgres',
124124
q{SELECT count(*) FROM pg_cluster_state
125125
WHERE category='inject' AND key LIKE '%.fault_type'}),
126-
'138',
127-
'all 138 injection points have a .fault_type entry under inject category (spec-5.13 +6 cluster-clean-leave-*; spec-2.41 +1 gcs-block-stale-ship; spec-5.2a +1 clean-xfer stale-holder; spec-4.8ab +2)');
126+
'139',
127+
'all 139 injection points have a .fault_type entry under inject category (spec-5.13 +6 cluster-clean-leave-*; spec-2.41 +1 gcs-block-stale-ship; spec-5.2a +1 clean-xfer stale-holder; spec-4.8ab +2; spec-5.13 H1.0.3 +1 clean-leave-survivor-suppress-preflight-ack)');
128128

129129
is( $node->safe_psql(
130130
'postgres',
131131
q{SELECT count(*) FROM pg_cluster_state
132132
WHERE category='inject' AND key LIKE '%.hits'}),
133-
'138',
134-
'all 138 injection points have a .hits entry under inject category (spec-5.13 +6 cluster-clean-leave-*; spec-2.41 +1 gcs-block-stale-ship; spec-5.2a +1 clean-xfer stale-holder; spec-4.8ab +2)');
133+
'139',
134+
'all 139 injection points have a .hits entry under inject category (spec-5.13 +6 cluster-clean-leave-*; spec-2.41 +1 gcs-block-stale-ship; spec-5.2a +1 clean-xfer stale-holder; spec-4.8ab +2; spec-5.13 H1.0.3 +1 clean-leave-survivor-suppress-preflight-ack)');
135135

136136

137137
# ----------

src/test/cluster_tap/t/021_block_format.pl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,13 @@
136136
# L6: heap PageInit (1.4) -> heap PageInitHeapPage (1.5 PIVOT A).
137137
# Stage 1.5 reserves 384B ITL array in PG special area at page tail,
138138
# so pd_lower = 32 + 4 (first ItemId) = 36 (not 420 like pre-PIVOT).
139-
# pagesize = 8192; layout version = 5; pd_special = 7808.
139+
# pagesize = 8192; layout version = 5; pd_special = 7800.
140140
is($node->safe_psql(
141141
'postgres', q{
142142
SELECT lower::text || ',' || pagesize::text || ',' || version::text || ',' || special::text
143143
FROM page_header(get_raw_page('t1', 0))}),
144-
'36,8192,5,7808',
145-
'L6 heap page first INSERT (PIVOT A): lower=36, pagesize=8192, version=5, special=7808 (ITL in special area)');
144+
'36,8192,5,7800',
145+
'L6 heap page first INSERT (PIVOT A): lower=36, pagesize=8192, version=5, special=7800 (ITL in special area)');
146146

147147
# L7: btree index PageInit -- root page version = 5.
148148
$node->safe_psql('postgres', q{

src/test/cluster_tap/t/022_itl_slot.pl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,16 +141,16 @@
141141
});
142142

143143
# L7: PIVOT A -- after first INSERT pd_lower = 36 (32 + 4-byte ItemId);
144-
# pd_special = 7808 (BLCKSZ - 384 ITL); pd_upper = 7776 (one tuple).
144+
# pd_special = 7800 (BLCKSZ - 392 ITL special); pd_upper = 7776 (one tuple).
145145
# This is fundamentally different from the pre-PIVOT layout where
146146
# pd_lower would be 420.
147147

148148
is($node->safe_psql(
149149
'postgres', q{
150150
SELECT lower::text || ',' || special::text || ',' || version::text
151151
FROM page_header(get_raw_page('t1', 0))}),
152-
'36,7808,5',
153-
'L7 PIVOT A heap page: lower=36, special=7808, version=5 (ITL in special area, not after header)');
152+
'36,7800,5',
153+
'L7 PIVOT A heap page: lower=36, special=7800, version=5 (ITL in special area, not after header)');
154154

155155
# L8: ITL slot array at special area (offset 7808-8191) is 384 zero bytes.
156156
is($node->safe_psql(
@@ -361,14 +361,14 @@
361361
'36',
362362
'L19 PIVOT A heap page after first INSERT: pd_lower = 36 (NOT 420)');
363363

364-
# L20: heap page PageGetSpecialSize = 384 (= CLUSTER_ITL_ARRAY_SIZE).
364+
# L20: heap page PageGetSpecialSize = 392 (= CLUSTER_ITL_SPECIAL_SIZE, spec-3.10 §v0.5).
365365
is($node->safe_psql(
366366
'postgres', q{
367367
SELECT (pagesize - special)
368368
FROM page_header(get_raw_page('pivot_a_heap', 0))
369369
}),
370-
'384',
371-
'L20 PIVOT A heap page PageGetSpecialSize = 384 (CLUSTER_ITL_ARRAY_SIZE)');
370+
'392',
371+
'L20 PIVOT A heap page PageGetSpecialSize = 392 (CLUSTER_ITL_SPECIAL_SIZE, spec-3.10 v0.5 recycle watermark)');
372372

373373
# L21: heap page PageGetMaxOffsetNumber = 1 (one INSERT'd tuple).
374374
is($node->safe_psql(

0 commit comments

Comments
 (0)