Skip to content

Ignite 27684#2

Open
chesnokoff wants to merge 10 commits into
masterfrom
ignite-27684
Open

Ignite 27684#2
chesnokoff wants to merge 10 commits into
masterfrom
ignite-27684

Conversation

@chesnokoff
Copy link
Copy Markdown
Owner

Thank you for submitting the pull request to the Apache Ignite.

In order to streamline the review of the contribution
we ask you to ensure the following steps have been taken:

The Contribution Checklist

  • There is a single JIRA ticket related to the pull request.
  • The web-link to the pull request is attached to the JIRA ticket.
  • The JIRA ticket has the Patch Available state.
  • The pull request body describes changes that have been made.
    The description explains WHAT and WHY was made instead of HOW.
  • The pull request title is treated as the final commit message.
    The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
  • A reviewer has been mentioned through the JIRA comments
    (see the Maintainers list)
  • The pull request has been checked by the Teamcity Bot and
    the green visa attached to the JIRA ticket (see TC.Bot: Check PR)

Notes

If you need any help, please email dev@ignite.apache.org or ask anу advice on http://asf.slack.com #ignite channel.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the Ignite TCP discovery “magic header” and improves diagnostics when an incoming connection doesn’t match the expected protocol header, plus adds a compatibility test to validate behavior when an older-version node attempts to join.

Changes:

  • Changed the global U.IGNITE_HEADER value used as the initial network packet header.
  • Enhanced TCP discovery “unknown connection” logs to mention incompatible nodes and include the received header bytes.
  • Added a new compatibility test and wired it into the compatibility basic suite.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java Improves unknown-connection diagnostics in TCP discovery by expanding the message and logging the received header bytes.
modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java Changes the IGNITE_HEADER magic value used across multiple network entry points.
modules/compatibility/src/test/java/org/apache/ignite/compatibility/testsuites/IgniteCompatibilityBasicTestSuite.java Registers the new compatibility test in the basic test suite.
modules/compatibility/src/test/java/org/apache/ignite/compatibility/spi/discovery/TcpDiscoveryDifferentClusterVersionsTest.java Adds a compatibility test asserting an older-version node is rejected and that the expected log message is emitted.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

log.debug("Unknown connection detected (is some other software connecting to " +
"this Ignite port?" +
"this Ignite port, or is this an incompatible Ignite node?" +
(!spi.isSslEnabled() ? " missed SSL configuration?" : "" ) +
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

In the debug log message, the optional SSL hint says "missed SSL configuration?" which looks like a typo and is inconsistent with the warn-level message below ("missing SSL configuration on remote node?"). Consider using consistent, grammatically correct wording in both messages (e.g., "missing SSL configuration"), since this text is now part of the updated diagnostics for unknown/incompatible connections.

Suggested change
(!spi.isSslEnabled() ? " missed SSL configuration?" : "" ) +
(!spi.isSslEnabled() ? " missing SSL configuration on remote node?" : "" ) +

Copilot uses AI. Check for mistakes.
Comment on lines +52 to +53
public static Collection<?> client() {
return List.of(true, false);
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

JUnit4 Parameterized expects each parameter set to be provided as an Object[] (or Object[][]). Returning a Collection here is likely to cause a ClassCastException when the runner tries to interpret each element as an Object[]. Please change this to return a Collection<Object[]> (e.g., [[true], [false]]) or use GridTestUtils.cartesianProduct(List.of(true, false)) to match other compatibility tests in this module.

Suggested change
public static Collection<?> client() {
return List.of(true, false);
public static Collection<Object[]> client() {
return GridTestUtils.cartesianProduct(List.of(true, false));

Copilot uses AI. Check for mistakes.
Comment on lines +96 to +107
/** Setup node closure. */
private class ConfigurationClosure implements IgniteInClosure<IgniteConfiguration> {
/** {@inheritDoc} */
@Override public void apply(IgniteConfiguration cfg) {
cfg.setClientMode(client);

cfg.setLocalHost("127.0.0.1");
TcpDiscoverySpi disco = new TcpDiscoverySpi();
disco.setIpFinder(LOCAL_IP_FINDER);

cfg.setDiscoverySpi(disco);
}
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

ConfigurationClosure is a non-static inner class, so it implicitly captures the outer test instance. Because compatibility tests serialize the closure to XML via XStream (IgniteCompatibilityNodeRunner.storeToFile) before starting the old-version node in a separate JVM, this will also serialize the outer test fields (including ListeningTestLogger state), which is unnecessary and can make closure serialization/deserialization fragile. Make the closure static (or a top-level class) and pass only the required inputs (e.g., client mode boolean) explicitly.

Copilot uses AI. Check for mistakes.
chesnokoff pushed a commit that referenced this pull request Feb 28, 2026
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.

2 participants