Repository navigation
Do not run fixed-address integration modules concurrently in targeted and flaky checks - #123750
Merged
alexey-milovidov merged 1 commit intoOct 11, 2026
Conversation
… and flaky checks A cluster that pins a container address (`add_instance(ipv4_address=...` or `ipv6_address=...)`) is placed on the single subnet of `docker_compose_net.yml`, so `ClickHouseCluster.start()` takes the host-wide `/tmp/docker_net.lock` and holds it until `shutdown()`; a waiter gives up after 10 minutes. Since the PR workflow became targeted-only (7859137), the targeted check runs its selection with `-n 3 --dist=loadfile` and nothing routes such modules apart. xdist starts the units with the most tests first, which in a DNS-heavy selection are the fixed-address modules. On ClickHouse#123699 `test_dns_cache` (held 515 s), `test_distributed_frozen_replica` (163 s) and `test_http_failover` started together; the third needed 678 s, hit the 600 s lock timeout, and all 6 of its tests errored at setup. In other targeted jobs the second holder routinely waits 400-541 s of its budget. In the targeted and flaky checks, keep at most one such module in the parallel phase and move the others to the sequential `-n 1` phase, which starts after the parallel pytest exits: - targeted (`--dist=loadfile`): the module with the largest `TEST_DURATIONS` entry stays parallel; - flaky (`--dist=each`): every worker runs every module, so all of them move, together with the existing `dist_each_sequential` modules. The modules are detected from their source: a non-None `ipv4_address=`/`ipv6_address=` keyword, which is what makes `add_instance` set `with_net_trics` (11 modules today, equal to an AST census of `add_instance` calls). A suite (`test_x`) or extensionless (`test_x/test`) selector is resolved to its module files first, for this check and for the `dist_each_sequential` prefixes. This replaces the `test_dns_cache` special case of the flaky check. Normal batches, bugfix validation and the retry phase are unchanged. Related: ClickHouse#123699 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Collaborator
Author
Internal second-model review (click to expand)
|
Contributor
|
Workflow [PR], commit [99259a2] Summary: ✅ AI ReviewSummaryThis PR replaces the hard-coded Final Verdict✅ No new findings. |
Collaborator
Author
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-4:20261003-183400 |
alexey-milovidov
approved these changes
Oct 10, 2026
Merged
via the queue into
ClickHouse:master
with commit Oct 11, 2026
7eaa625
160 of 161 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: #123699
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
Failing job: Integration tests (amd_asan_ubsan, db disk, targeted) on #123699. All 6
test_http_failovertests errored at setup (started_cluster did not yield a value); the job log has the cause,Could not acquire the lock /tmp/docker_net.lock within 10 minutes. The job's own-n 1rerun passed them in 72 s, but the job stays red.A cluster that pins a container address uses the one subnet of
docker_compose_net.yml, so it holds the host-wide/tmp/docker_net.lockfromstart()toshutdown(), and a waiter gives up after 600 s. Since the targeted check runs-n 3 --dist=loadfile, nothing keeps such modules apart, and xdist starts the largest modules first. Heretest_dns_cache(held 515 s),test_distributed_frozen_replica(163 s) andtest_http_failoverstarted together, so the third needed 678 s. In other targeted jobs the second holder routinely waits 400-541 s.Change: in targeted and flaky checks at most one such module stays in the parallel phase, and the others move to the sequential
-n 1phase, which starts after the parallel one exits. Targeted keeps the one with the largestTEST_DURATIONS; flaky (--dist=each) moves all of them. The modules are detected from their source (a non-Noneipv4_address=/ipv6_address=keyword, 11 modules today), which replaces thetest_dns_cachespecial case. Normal batches are unchanged.Cost: only targeted jobs with 2+ such modules change (about 2.6%); they add the moved modules' serial time (about 7 min here), partly offset by the lock waits that disappear.
Validation: a replay of this job's selection keeps
test_dns_cacheand the 4 non-holders parallel and moves the other 4 holders; on master all 9 are parallel.Alternative: all such modules on one xdist worker via a custom scheduler in
tests/integration/conftest.py, which keeps the overlap but changes scheduling for every integration run.Workflow [PR]
Sync PR [sync-upstream/pr/123750]
Version info
26.10.1.2088-master(included in26.10and later)