Skip to content

Commit 12bf6ca

Browse files
rustyconoverclaude
andcommitted
more_splits_than_threads.test: 64 splits, not 1000
The claim is that splits outnumber readers, so each reader re-initializes a reused connection several times. 64 splits over 8 threads is eight claims per reader; 1000 was ~2000 HTTP round trips per query and the slowest file in the HTTP lanes (10-14 s alone, timing out at 60 s under 8-way load). Expected results are unchanged: they depend on n, not on the split count. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent d6c2cba commit 12bf6ca

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

‎test/sql/integration/splits/more_splits_than_threads.test‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
# name: test/sql/integration/splits/more_splits_than_threads.test
2-
# description: 1000 splits over 8 threads: no duplicates, no drops
2+
# description: 64 splits over 8 threads: no duplicates, no drops
33
# group: [vgi_integration_splits]
44

5-
# Splits outnumber readers, so each reader claims many in sequence. That is the
5+
# Splits outnumber readers, so each reader claims several in sequence. That is the
66
# shape that exercises re-initializing a REUSED connection: the previous split's
77
# stream has to be closed (IPC EOS on stdin) before the next init is written, or
88
# the init request lands inside an unterminated stream and the transport mis-frames.
99
#
1010
# COUNT(DISTINCT) is the assertion that matters, not COUNT(*). A drain loop that
1111
# re-reads a split would still produce 5000 rows if it also dropped one; only
1212
# distinctness separates "read everything once" from "read something twice".
13+
#
14+
# 64 splits is eight per reader at threads=8: every reader re-initializes its
15+
# connection repeatedly, which is the whole claim. It used to be 1000, which
16+
# costs ~2000 HTTP round trips per query and proves nothing more.
1317

1418
require-env VGI_TEST_WORKER
1519

@@ -25,16 +29,16 @@ SET threads=8;
2529

2630
query III
2731
SELECT count(*), count(DISTINCT n), sum(n)
28-
FROM example.main.split_many(n := 5000, splits := 1000);
32+
FROM example.main.split_many(n := 5000, splits := 64);
2933
----
3034
5000 5000 12497500
3135

32-
# Same claim set, single-threaded: one reader must drain all 1000 sequentially.
36+
# Same claim set, single-threaded: one reader must drain all 64 sequentially.
3337
statement ok
3438
SET threads=1;
3539

3640
query III
3741
SELECT count(*), count(DISTINCT n), sum(n)
38-
FROM example.main.split_many(n := 5000, splits := 1000);
42+
FROM example.main.split_many(n := 5000, splits := 64);
3943
----
4044
5000 5000 12497500

0 commit comments

Comments
 (0)