Skip to content

IGNITE-27631 Use MessageSerializer for SingleNodeMessage#12827

Open
NSAmelchev wants to merge 2 commits intoapache:masterfrom
NSAmelchev:ignite-27631
Open

IGNITE-27631 Use MessageSerializer for SingleNodeMessage#12827
NSAmelchev wants to merge 2 commits intoapache:masterfrom
NSAmelchev:ignite-27631

Conversation

@NSAmelchev
Copy link
Contributor

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 tab PR Check at TC.Bot - Instance 1 or TC.Bot - Instance 2)

Notes

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

@NSAmelchev NSAmelchev force-pushed the ignite-27631 branch 7 times, most recently from b3cb9e7 to c128a8e Compare March 6, 2026 13:34
factory.register((short)22, TcpDiscoveryServerOnlyCustomEventMessage::new,
new TcpDiscoveryServerOnlyCustomEventMessageSerializer());
factory.register((short)23, FullMessage::new, new FullMessageSerializer());

Copy link
Contributor

Choose a reason for hiding this comment

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

Why spaced and exactly 86? No 24? Or 100? No comment on this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This message already exists - just use it as is, without changing the direct type. The current file's compactness is good — comments wouldn't help. Must be a framework-specific thing.

factory.register((short)510, UserAcceptedMessage::new, new UserAcceptedMessageSerializer());
factory.register((short)511, UserProposedMessage::new, new UserProposedMessageSerializer());

factory.register((short)520, SnapshotOperationResponse::new, new SnapshotOperationResponseSerializer());
Copy link
Contributor

Choose a reason for hiding this comment

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

Are they custom messages? I believe we've met a problem of the messages sharing between Discovery and Communication. This wasn't significant until the shared messages number exceeds 5 maybe. The messages sharing should be discussed. We might introduce a message number replacement at the message registering. Or even use a message-content-generated hash/id to exclude the manual-processed numbers.

Copy link
Contributor

@Vladsz83 Vladsz83 Mar 6, 2026

Choose a reason for hiding this comment

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

If we do smth. like this (the messages reuse) , TcpDiscoveryNodeMetricsMessage, TcpDiscoveryCacheMetricsMessage, TcpDiscoveryNodeFullMetricsMessage should be reverted too. Look for "We cannot directly reuse {@link".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's normal when a message is forwarded through different communication protocols. To me, serialization is a more high-level abstraction. Especially for RU purposes.

Copy link
Contributor

Choose a reason for hiding this comment

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

Consider the case when id of a shared message is already occupied in Discovery and you can't reuse. I belive that using of ids from one domain should not be "as is" in other domain where messages and their numeration are different by nature.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 6, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
47 New Code Smells (required ≤ 1)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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.

3 participants