Skip to content

Commit c5a40e9

Browse files
antiguruclaude
andcommitted
test: pin the peek row iteration limit to one worker
The limit is enforced per worker, so a multi-worker cluster walks the same rows a share at a time and no single walk reaches it. That made the assertion depend on the cluster's worker count, and it made the one-shot query disagree with the indexed view --auto-index-selects wraps it in: the view holds only the three rows the LIMIT produced, spread across workers, so it answered where the one-shot query raised. Pin the block to a single-worker cluster, which is what max_result_size.slt already does for the same reason. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 2ce34f8 commit c5a40e9

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

test/sqllogictest/persist-fast-path.slt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,17 @@ ALTER SYSTEM RESET enable_compute_peek_response_stash
245245
COMPLETE 0
246246

247247
# Persist-backed peeks enforce the same row iteration limit.
248+
#
249+
# The limit is per worker, so this needs a single-worker cluster to be
250+
# deterministic. Spread across several workers the same rows are walked a share
251+
# at a time and no single walk reaches the limit, which also makes a one-shot
252+
# query disagree with the indexed view --auto-index-selects wraps it in.
253+
statement ok
254+
CREATE CLUSTER peek_iteration_limit_cluster SIZE 'scale=1,workers=1'
255+
256+
statement ok
257+
SET cluster TO 'peek_iteration_limit_cluster'
258+
248259
simple conn=mz_system,user=mz_system
249260
ALTER SYSTEM SET enable_compute_peek_row_iteration_limit TO true;
250261
----
@@ -280,6 +291,9 @@ ALTER SYSTEM RESET enable_compute_peek_row_iteration_limit;
280291
----
281292
COMPLETE 0
282293

294+
statement ok
295+
RESET cluster
296+
283297
# The Persist fast path does not apply when an index exists.
284298

285299
statement ok

0 commit comments

Comments
 (0)