Skip to content

Make match_max effective in 04615_client_progress_table_toggle_config - #112160

Merged
alexey-milovidov merged 1 commit into
masterfrom
fix-04615-expect-match-max
Jul 28, 2026
Merged

alexey-milovidov merged 1 commit into
masterfrom
fix-04615-expect-match-max

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Jul 27, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • CI Fix or improvement (changelog entry is not required)

Make match_max actually take effect in 04615_client_progress_table_toggle_config.

match_max 100000 without -d applies to the current spawn id, and there is none at the point where the test sets it, so all three clients spawned later ran with expect's 2000-byte default buffer instead. That is smaller than a single rendering of the live progress table, while this test streams tens of kilobytes of continuously redrawn table through the pty, so expect kept discarding the oldest part of its buffer while matching.

The test fails by timeout on loaded runners (9 failures in 12036 runs over the last week, none on master head), for example: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=100173&sha=0b83f4eaa78570a1cb035da08702534fe3c4bfe7&name_0=PR&name_1=Stateless%20tests%20%28amd_debug%2C%20distributed%20plan%2C%20s3%20storage%2C%20parallel%29 — the expect debug log there shows matching against a buffer whose beginning had been cut mid-token.

Verified locally: [match_max] right after a spawn reports 2000 without -d and 100000 with it, and the test still passes (3/3 runs).

Note that all 53 .expect tests under tests/queries/0_stateless set match_max 100000 the same ineffective way. This change touches only the test that is currently failing, because a larger buffer also makes expect retain older output, which could change how negative expect patterns behave in the other tests — that sweep is better done deliberately.

Related: #100173

Version info

  • Merged into: 26.8.1.303 (included in 26.8 and later)

…fig`

`match_max 100000` without `-d` applies to the *current* spawn id, and there is
none at the point where the test sets it, so all three clients spawned later ran
with expect's 2000-byte default buffer instead. That is smaller than a single
rendering of the live progress table, while this test streams tens of kilobytes
of continuously redrawn table through the pty, so expect kept discarding the
oldest part of its buffer during matching.

The test failed by timeout on a loaded `amd_debug, distributed plan, s3 storage`
runner (9 failures in 12036 runs over the last week, none on `master` head),
e.g. https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=100173&sha=0b83f4eaa78570a1cb035da08702534fe3c4bfe7&name_0=PR&name_1=Stateless%20tests%20%28amd_debug%2C%20distributed%20plan%2C%20s3%20storage%2C%20parallel%29
(#100173), where the debug log shows
expect matching against a buffer whose beginning had been cut mid-token.

Use `match_max -d 100000` so the value the test already asks for is inherited by
every `spawn`. Verified locally: `[match_max]` after a `spawn` reports 2000
without `-d` and 100000 with it, and the test still passes.

Note that all 53 `.expect` tests under `tests/queries/0_stateless` set
`match_max 100000` the same ineffective way; this commit only changes the one
test that is failing, since a larger buffer also makes expect retain older
output, which could affect negative `expect` patterns in the other tests.
@clickhouse-gh

clickhouse-gh Bot commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [58598eb]

Summary: ✅


AI Review

Summary

This PR fixes 04615_client_progress_table_toggle_config.expect so the larger match_max value is inherited by the later spawn calls instead of being silently ignored before any spawn exists. For the contract this test is checking, the change is correct and appropriately scoped; I did not find a correctness, safety, or evidence gap in the current diff.

Final Verdict
  • Status: ✅ Approve

@alexey-milovidov alexey-milovidov left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alexey-milovidov alexey-milovidov self-assigned this Jul 28, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Jul 28, 2026
Merged via the queue into master with commit d1d4f43 Jul 28, 2026
179 checks passed
@alexey-milovidov
alexey-milovidov deleted the fix-04615-expect-match-max branch July 28, 2026 19:25
@robot-clickhouse robot-clickhouse added the pr-synced-to-cloud The PR is synced to the cloud repo label Jul 28, 2026
pull Bot pushed a commit to Haofei/ClickHouse that referenced this pull request Sep 6, 2026
`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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-ci pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants