Skip to content

Commit 6428182

Browse files
committed
Modify concurrent isolation test to use non-batched mode for manual refresh
1 parent e7aaf4c commit 6428182

3 files changed

Lines changed: 23 additions & 23 deletions

File tree

tsl/test/isolation/expected/cagg_refresh_cleanup_register.out

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ debug_waitpoint_enable
77

88

99
step R2_refresh:
10-
CALL refresh_continuous_aggregate('cond_daily', '2026-01-05', '2026-02-15');
10+
CALL refresh_continuous_aggregate('cond_daily', '2026-01-05', '2026-02-15', options => jsonb_build_object('buckets_per_batch', 0));
1111
<waiting ...>
1212
step L1_lock:
1313
BEGIN;
@@ -20,10 +20,10 @@ debug_waitpoint_release
2020

2121

2222
step R3_refresh:
23-
CALL refresh_continuous_aggregate('cond_daily', '2026-02-15', '2026-03-15');
23+
CALL refresh_continuous_aggregate('cond_daily', '2026-02-15', '2026-03-15', options => jsonb_build_object('buckets_per_batch', 0));
2424
<waiting ...>
2525
step R4_refresh:
26-
CALL refresh_continuous_aggregate('cond_daily', '2026-03-15', '2026-03-30');
26+
CALL refresh_continuous_aggregate('cond_daily', '2026-03-15', '2026-03-30', options => jsonb_build_object('buckets_per_batch', 0));
2727
<waiting ...>
2828
step check_locks:
2929
SELECT l.mode, l.granted
@@ -50,7 +50,7 @@ step check_jobs:
5050

5151
user_view_name|start_time |end_time
5252
--------------+----------------------------+----------------------------
53-
cond_daily |Sun Feb 08 16:00:00 2026 PST|Sat Feb 14 16:00:00 2026 PST
53+
cond_daily |Mon Jan 05 16:00:00 2026 PST|Sat Feb 14 16:00:00 2026 PST
5454

5555
step L1_unlock:
5656
COMMIT;
@@ -89,7 +89,7 @@ debug_waitpoint_enable
8989

9090

9191
step R2_refresh:
92-
CALL refresh_continuous_aggregate('cond_daily', '2026-01-05', '2026-02-15');
92+
CALL refresh_continuous_aggregate('cond_daily', '2026-01-05', '2026-02-15', options => jsonb_build_object('buckets_per_batch', 0));
9393
<waiting ...>
9494
step L1_lock:
9595
BEGIN;
@@ -102,10 +102,10 @@ debug_waitpoint_release
102102

103103

104104
step R3_refresh:
105-
CALL refresh_continuous_aggregate('cond_daily', '2026-02-15', '2026-03-15');
105+
CALL refresh_continuous_aggregate('cond_daily', '2026-02-15', '2026-03-15', options => jsonb_build_object('buckets_per_batch', 0));
106106
<waiting ...>
107107
step R4_overlapping_refresh:
108-
CALL refresh_continuous_aggregate('cond_daily', '2026-03-01', '2026-03-15');
108+
CALL refresh_continuous_aggregate('cond_daily', '2026-03-01', '2026-03-15', options => jsonb_build_object('buckets_per_batch', 0));
109109
<waiting ...>
110110
step check_locks:
111111
SELECT l.mode, l.granted
@@ -132,7 +132,7 @@ step check_jobs:
132132

133133
user_view_name|start_time |end_time
134134
--------------+----------------------------+----------------------------
135-
cond_daily |Sun Feb 08 16:00:00 2026 PST|Sat Feb 14 16:00:00 2026 PST
135+
cond_daily |Mon Jan 05 16:00:00 2026 PST|Sat Feb 14 16:00:00 2026 PST
136136

137137
step L1_unlock:
138138
COMMIT;
@@ -172,7 +172,7 @@ debug_waitpoint_enable
172172

173173

174174
step R3_refresh:
175-
CALL refresh_continuous_aggregate('cond_daily', '2026-02-15', '2026-03-15');
175+
CALL refresh_continuous_aggregate('cond_daily', '2026-02-15', '2026-03-15', options => jsonb_build_object('buckets_per_batch', 0));
176176
<waiting ...>
177177
step check_jobs:
178178
SELECT ca.user_view_name,
@@ -185,7 +185,7 @@ step check_jobs:
185185

186186
user_view_name|start_time |end_time
187187
--------------+----------------------------+----------------------------
188-
cond_daily |Sat Mar 07 16:00:00 2026 PST|Sat Mar 14 17:00:00 2026 PDT
188+
cond_daily |Sun Feb 15 16:00:00 2026 PST|Sat Mar 14 17:00:00 2026 PDT
189189

190190
step A1_revoke_perm:
191191
REVOKE SELECT on conditions FROM cagg_user;
@@ -217,7 +217,7 @@ debug_waitpoint_enable
217217

218218

219219
step R3_refresh:
220-
CALL refresh_continuous_aggregate('cond_daily', '2026-02-15', '2026-03-15');
220+
CALL refresh_continuous_aggregate('cond_daily', '2026-02-15', '2026-03-15', options => jsonb_build_object('buckets_per_batch', 0));
221221
<waiting ...>
222222
step check_jobs:
223223
SELECT ca.user_view_name,
@@ -230,7 +230,7 @@ step check_jobs:
230230

231231
user_view_name|start_time |end_time
232232
--------------+----------------------------+----------------------------
233-
cond_daily |Sat Mar 07 16:00:00 2026 PST|Sat Mar 14 17:00:00 2026 PDT
233+
cond_daily |Sun Feb 15 16:00:00 2026 PST|Sat Mar 14 17:00:00 2026 PDT
234234

235235
step A1_revoke_mat_perm:
236236
DO $$
@@ -273,7 +273,7 @@ debug_waitpoint_enable
273273

274274

275275
step R2_refresh:
276-
CALL refresh_continuous_aggregate('cond_daily', '2026-01-05', '2026-02-15');
276+
CALL refresh_continuous_aggregate('cond_daily', '2026-01-05', '2026-02-15', options => jsonb_build_object('buckets_per_batch', 0));
277277
<waiting ...>
278278
step check_jobs_metadata_manual:
279279
SELECT ca.user_view_name,
@@ -352,7 +352,7 @@ debug_waitpoint_enable
352352

353353

354354
step R1_refresh:
355-
CALL refresh_continuous_aggregate('cond_daily', '2026-01-05', '2026-03-15');
355+
CALL refresh_continuous_aggregate('cond_daily', '2026-01-05', '2026-03-15', options => jsonb_build_object('buckets_per_batch', 0));
356356
<waiting ...>
357357
step check_jobs:
358358
SELECT ca.user_view_name,
@@ -365,7 +365,7 @@ step check_jobs:
365365

366366
user_view_name|start_time |end_time
367367
--------------+----------------------------+----------------------------
368-
cond_daily |Tue Mar 10 17:00:00 2026 PDT|Sat Mar 14 17:00:00 2026 PDT
368+
cond_daily |Mon Jan 05 16:00:00 2026 PST|Sat Mar 14 17:00:00 2026 PDT
369369

370370
step K1_terminate:
371371
DO $$
@@ -400,10 +400,10 @@ step L1_lock:
400400
IN ACCESS EXCLUSIVE MODE;
401401

402402
step R2_refresh:
403-
CALL refresh_continuous_aggregate('cond_daily', '2026-01-05', '2026-02-15');
403+
CALL refresh_continuous_aggregate('cond_daily', '2026-01-05', '2026-02-15', options => jsonb_build_object('buckets_per_batch', 0));
404404
<waiting ...>
405405
step R3_refresh:
406-
CALL refresh_continuous_aggregate('cond_daily', '2026-02-15', '2026-03-15');
406+
CALL refresh_continuous_aggregate('cond_daily', '2026-02-15', '2026-03-15', options => jsonb_build_object('buckets_per_batch', 0));
407407
<waiting ...>
408408
step L1_unlock:
409409
COMMIT;

tsl/test/isolation/specs/cagg_concurrent_policy_register.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ setup
5757
# Materialize L1 so the hierarchical L2 CAgg has source data
5858
setup
5959
{
60-
CALL refresh_continuous_aggregate('mat_3pol_m1', NULL, NULL);
60+
CALL refresh_continuous_aggregate('mat_3pol_m1', NULL, NULL, options => jsonb_build_object('buckets_per_batch', 0));
6161
}
6262

6363
# Create the hierarchical L2 CAgg with two adjacent refresh policies of its own

tsl/test/isolation/specs/cagg_refresh_cleanup_register.spec

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ setup {
5959
INSERT INTO cancelpid SELECT pg_backend_pid();
6060
}
6161
step "R1_refresh" {
62-
CALL refresh_continuous_aggregate('cond_daily', '2026-01-05', '2026-03-15');
62+
CALL refresh_continuous_aggregate('cond_daily', '2026-01-05', '2026-03-15', options => jsonb_build_object('buckets_per_batch', 0));
6363
}
6464

6565
# Session WP: enables / disables waitpoints
@@ -102,7 +102,7 @@ setup {
102102
SET SESSION lock_timeout = '2s';
103103
}
104104
step "R2_refresh" {
105-
CALL refresh_continuous_aggregate('cond_daily', '2026-01-05', '2026-02-15');
105+
CALL refresh_continuous_aggregate('cond_daily', '2026-01-05', '2026-02-15', options => jsonb_build_object('buckets_per_batch', 0));
106106
}
107107

108108
session "R3"
@@ -111,7 +111,7 @@ setup {
111111
SET SESSION lock_timeout = '2s';
112112
}
113113
step "R3_refresh" {
114-
CALL refresh_continuous_aggregate('cond_daily', '2026-02-15', '2026-03-15');
114+
CALL refresh_continuous_aggregate('cond_daily', '2026-02-15', '2026-03-15', options => jsonb_build_object('buckets_per_batch', 0));
115115
}
116116

117117
session "R4"
@@ -120,10 +120,10 @@ setup {
120120
SET SESSION lock_timeout = '2s';
121121
}
122122
step "R4_refresh" {
123-
CALL refresh_continuous_aggregate('cond_daily', '2026-03-15', '2026-03-30');
123+
CALL refresh_continuous_aggregate('cond_daily', '2026-03-15', '2026-03-30', options => jsonb_build_object('buckets_per_batch', 0));
124124
}
125125
step "R4_overlapping_refresh" {
126-
CALL refresh_continuous_aggregate('cond_daily', '2026-03-01', '2026-03-15');
126+
CALL refresh_continuous_aggregate('cond_daily', '2026-03-01', '2026-03-15', options => jsonb_build_object('buckets_per_batch', 0));
127127
}
128128

129129
session "A1"

0 commit comments

Comments
 (0)