Skip to content

IGNITE-1025 Warn when IP finder has a long list of addresses - #13739

Open
XianReallyHot-ZZH wants to merge 2 commits into
apache:masterfrom
XianReallyHot-ZZH:IGNITE-1025-ip-finder-addresses-warning
Open

XianReallyHot-ZZH wants to merge 2 commits into
apache:masterfrom
XianReallyHot-ZZH:IGNITE-1025-ip-finder-addresses-warning

Conversation

@XianReallyHot-ZZH

Copy link
Copy Markdown

Description

Ticket: https://issues.apache.org/jira/browse/IGNITE-1025

When the IP finder resolves a long list of addresses, node join/reconnect may take significant time: a connection attempt to an unavailable address usually blocks until socket timeout instead of failing fast (on Windows OS this typically looks like the node hangs for a while).

This PR adds a throttled warning in TcpDiscoverySpi.resolvedAddresses() when the resolved address list exceeds ADDRS_WARN_THRESHOLD (20). The warning explains why startup can be slow and suggests making sure that all IP finder addresses are correct and reachable and reducing the address list.

The warning is printed regardless of OS so it is deterministic and testable (CI runs on Linux), while the message text explains the Windows-specific amplification described in the ticket.

Supersedes the stale attempt #2966 (closed in 2022 without review).

Testing

  • TcpDiscoveryLongAddressListWarnSelfTest added:
    • testWarnOnLongAddressList — 21 registered addresses → warning is printed.
    • testNoWarnOnShortAddressList — 3 registered addresses → no warning.
    • Uses loopback addresses with unused ports, so connection attempts fail fast on every OS (no dependence on Windows-specific behavior in the test).
  • mvn -pl modules/core test -Dtest=TcpDiscoveryLongAddressListWarnSelfTest — 2/2 green (locally verified red before the fix as well).

@XianReallyHot-ZZH

Copy link
Copy Markdown
Author

Per contribution guidelines, adding the Java version used to compile and run tests locally:

java version "17.0.12" 2024-07-16 LTS

Test command: mvn -pl modules/core test -Dtest=TcpDiscoveryLongAddressListWarnSelfTest — 2/2 green.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant