Repository navigation
Make match_max effective in 05098_client_psql_describe_table - #118379
Conversation
`match_max 100000` on line 23 runs before the `spawn` on line 41, and without `-d` it applies to the *current* spawn id, of which there is none at that point, so the client ran with expect's 2000-byte default buffer, i.e. 6001 chars of capacity. The bare `\l` expands to `SHOW DATABASES`. On a shared `arm_binary, parallel` runner that listed 69 databases with every row padded to 219 chars, because a concurrent test held a ~200-char database name: a 15,754-char burst, 2.6x the window. The test failed by timeout there, on https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=117423&sha=8f6c4316969230ee19799531b03487484cacf0b6&name_0=PR&name_1=Stateless%20tests%20%28arm_binary%2C%20parallel%29 (ClickHouse#117423), where the `.expect.debuglog` shows expect forgetting output four times while matching the prompt on line 94, ending with the buffer pinned at 6001 and a final read of 13 chars. Use `match_max -d 100000` so the value the test already asks for is inherited by the `spawn`. Verified locally: `[match_max]` after a `spawn` reports 2000 without `-d` and 100000 with it. With 75 databases and one 206-char name making the listing 17,679 chars, the debuglogs of 50 runs hold 304 full-buffer discards without this change and 0 with it, and the widest buffer expect examines rises from the 6001-char ceiling to the whole listing; reverting only the `-d` brings the discards back. 50/50 runs pass with and without that fixture. The 60 s timeout itself is rate-dependent and did not reproduce locally, so what is shown here is that the assertion ran inside a discard regime the test's declared buffer would never have entered. Of the 62 `.expect` tests under `tests/queries/0_stateless`, the other 60 set `match_max` the same ineffective way; as in ClickHouse#112160 this commit only changes the test that is failing, since a larger buffer also makes expect retain older output, which could affect negative `expect` patterns in the other tests. Co-Authored-By: Claude Opus 5 <[email protected]>
Internal second-model review: 1 finding, adjudicated
💡 The burst is produced by a concurrent test, not by this one: the failing debuglog's padding driver is a 211-char database name owned by Session id: cron:clickhouse-review-slot-8:20260906-042800 |
|
Workflow [PR], commit [b27db6c] Summary: ✅ AI ReviewSummaryThis PR fixes Final Verdict✅ No actionable findings. |
|
cc @azat, could you review this? |
949051a
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Make
match_maxtake effect in05098_client_psql_describe_table, so the expect harness holds a whole\llisting instead of running with expect's 2000-byte default buffer.Description
Stateless tests (arm_binary, parallel)failed this one-day-old test (#118281) withReason: return code: 1, itsexpect_aftertimeout arm, on #117423: report.match_max 100000on line 23 runs before thespawnon line 41, and without-dit applies to the current spawn id, of which there is none yet, so the client ran with expect's 2000-byte default: a 6001-char buffer. The bare\lexpands toSHOW DATABASES, which on that shared runner listed 69 databases, each padded to 219 chars by a concurrent test's ~200-char name, a 15,754-char burst, 2.6x the window. The.expect.debuglogshows expect forgetting output four times while matching the prompt after that\l, ending with the buffer pinned at 6001, a 13-char final read, and the timeout.match_max -d 100000makes the value the test already asks for reach thespawn.Verified locally:
[match_max]after aspawnreports 2000 without-dand 100000 with it. Against a 17,679-char listing, the debuglogs of 50 runs hold 304 full-buffer discards without the change and 0 with it; reverting only the-dbrings them back. 50/50 runs pass either way. The 60 s timeout itself is rate-dependent and did not reproduce locally; what is shown is that the assertion ran in a discard regime the declared buffer would have prevented.Of the 62
.expecttests here, the other 60 setmatch_maxthe same ineffective way. As in #112160 this changes only the test that is failing, since a larger buffer also makes expect retain older output, which could affect negativeexpectpatterns elsewhere. Bounding the listing instead, as #113713 did for02105_backslash_letter_commands, would drop the bare\lthis line asserts and would letexpect "system"match the echoed predicate; the listing therefore stays shared-server output, now with room for about 6x the measured burst.Related: #117423
Workflow [PR]
Sync PR [sync-upstream/pr/118379]