Skip to content

Skip 02947_parallel_replicas_remote on macOS (arm_darwin) - #107420

Merged
alexey-milovidov merged 1 commit into
ClickHouse:masterfrom
groeneai:darwin-skip-02947-parallel-replicas-remote
Jun 14, 2026
Merged

alexey-milovidov merged 1 commit into
ClickHouse:masterfrom
groeneai:darwin-skip-02947-parallel-replicas-remote

Conversation

@groeneai

@groeneai groeneai commented Jun 13, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #106689

Changelog category (leave one):

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

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

...

Description

02947_parallel_replicas_remote fails in Fast test (arm_darwin) (native macOS).

The test runs:

SELECT count(), sum(id)
FROM remote('127.0.0.1|127.0.0.2|127.0.0.3|127.0.0.4', currentDatabase(), test)
SETTINGS enable_parallel_replicas = 1, max_parallel_replicas = 4, prefer_localhost_replica = 0, ...;

macOS only binds 127.0.0.1 to loopback and does not auto-route the rest of 127.0.0.0/8, unlike Linux. With prefer_localhost_replica = 0, connecting to 127.0.0.3 and 127.0.0.4 times out:

ConnectionPoolWithFailover: Connection failed at try N1, reason: Code: 209. DB::NetException: Timeout: connect timed out: 127.0.0.3:9000 (SOCKET_TIMEOUT)
ConnectionPoolWithFailover: Connection failed at try N1, reason: Code: 209. DB::NetException: Timeout: connect timed out: 127.0.0.4:9000 (SOCKET_TIMEOUT)

The query result is still correct (failover falls back to 127.0.0.1, stdout is 100 4950), but the connection warnings reach stderr and clickhouse-test treats any stderr output as a failure.

This is the same macOS loopback limitation already handled for sibling tests in ci/defs/darwin.skip (for example 02875_parallel_replicas_remote). This adds 02947_parallel_replicas_remote to the skip list.

Pre-existing arm_darwin-only environment issue, unrelated to #106689 (which only changes the clickhouse-local temporary storage limit). Surfaced on #106689's Fast test (arm_darwin) run.

Version info

  • Merged into: 26.6.1.777

The test uses remote('127.0.0.1|127.0.0.2|127.0.0.3|127.0.0.4', ...) with
prefer_localhost_replica = 0. macOS only binds 127.0.0.1 to loopback and does
not auto-route the rest of 127.0.0.0/8, unlike Linux. Connecting to 127.0.0.3
and 127.0.0.4 therefore times out with SOCKET_TIMEOUT. The query result is
still correct (the failover falls back to 127.0.0.1), but the connection
warnings reach stderr and clickhouse-test treats any stderr as a failure.

This is the same macOS loopback limitation already handled for sibling tests
in ci/defs/darwin.skip (e.g. 02875_parallel_replicas_remote). Add this test to
the skip list as well.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@groeneai

Copy link
Copy Markdown
Collaborator Author

Pre-PR validation gate

# Question Answer
a Deterministic repro? Yes, by environment. On macOS, connect() to 127.0.0.3/127.0.0.4 always times out (only 127.0.0.1 is bound to loopback; 127.0.0.0/8 is not auto-routed as on Linux). The arm_darwin run shows the SOCKET_TIMEOUT warnings on stderr deterministically while stdout is the correct 100 4950.
b Root cause explained? macOS binds only 127.0.0.1, not the rest of 127.0.0.0/8. The test's remote('127.0.0.1|127.0.0.2|127.0.0.3|127.0.0.4', ...) with prefer_localhost_replica = 0 attempts connections to .3/.4, which time out (Code 209 SOCKET_TIMEOUT). The warnings reach stderr; clickhouse-test fails any test that writes to stderr, even though the query result is correct.
c Fix matches root cause? Yes. The macOS networking limitation cannot be changed from the test, so the established remedy is to skip the test on Darwin (ci/defs/darwin.skip). The test continues to run normally on Linux.
d Test intent preserved / new tests added? Yes on Linux (unchanged there, full coverage retained). No new test needed: this is a platform skip for a pre-existing environment limitation, not a code bug.
e Both directions demonstrated? The arm_darwin CI report (PR #106689, sha 61f88fe) shows the failure with the test present; adding it to darwin.skip excludes it from the macOS Fast test, matching the existing treatment of sibling 02875_parallel_replicas_remote.
f Fix is general, not a narrow patch? Yes. This is the same remedy already applied to sibling 127.0.0.x remote() tests (e.g. 02875_parallel_replicas_remote). No source-code bug; nothing to generalize across code paths.

Pre-existing arm_darwin-only environment issue, unrelated to the parent PR #106689. Submitted as a separate PR.

Session id: cron:clickhouse-worker-slot-1:20260613-222600

@groeneai

Copy link
Copy Markdown
Collaborator Author

cc @maxknv — could you review this? It adds 02947_parallel_replicas_remote to ci/defs/darwin.skip: the test connects to 127.0.0.3/127.0.0.4 via remote() with prefer_localhost_replica = 0, which times out on macOS (only 127.0.0.1 is bound to loopback, no 127.0.0.0/8 auto-routing). Same remedy already applied to sibling 02875_parallel_replicas_remote.

@alexey-milovidov alexey-milovidov added the can be tested Allows running workflows for external contributors label Jun 14, 2026
@clickhouse-gh

clickhouse-gh Bot commented Jun 14, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [cd91d6e]

Summary: ✅


AI Review

Summary
  • This PR adds 02947_parallel_replicas_remote to ci/defs/darwin.skip, matching the test's use of remote('127.0.0.1|127.0.0.2|127.0.0.3|127.0.0.4', ...) with prefer_localhost_replica = 0 and the existing Darwin skip treatment for sibling parallel replicas remote tests. I found no correctness, coverage, metadata, or rollout issues that warrant inline review comments.
Final Verdict
  • Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Jun 14, 2026
@alexey-milovidov
alexey-milovidov merged commit fd381ef into ClickHouse:master Jun 14, 2026
165 of 166 checks passed
@alexey-milovidov

Copy link
Copy Markdown
Member

@groeneai, send another PR that will add interface aliases on Mac to allow all similar tests.

@groeneai

Copy link
Copy Markdown
Collaborator Author

@alexey-milovidov done: #107435 aliases 127.0.0.2..16 on lo0 in the macOS Fast test pre-hook and un-skips the parallel-replica remote() tests (02875, 02947, 03562, 03572, 03595). ~150 other darwin.skip entries also connect to 127.0.0.2+ and should pass now too; I kept the un-skip scope conservative and we can widen it incrementally once the runner behavior is confirmed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors 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.

3 participants