Skip to content

IGNITE-28455 Remove volatile node names and IDs#7930

Merged
sashapolo merged 1 commit intoapache:mainfrom
gridgain:ignite-28455
Apr 6, 2026
Merged

IGNITE-28455 Remove volatile node names and IDs#7930
sashapolo merged 1 commit intoapache:mainfrom
gridgain:ignite-28455

Conversation

@sashapolo
Copy link
Copy Markdown
Contributor

https://issues.apache.org/jira/browse/IGNITE-28455

Thank you for submitting the pull request.

To streamline the review process of the patch and ensure better code quality
we ask both an author and a reviewer to verify the following:

The Review Checklist

  • Formal criteria: TC status, codestyle, mandatory documentation. Also make sure to complete the following:
    - 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 description of the JIRA ticket explains WHAT was made, WHY and 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.
  • Design: new code conforms with the design principles of the components it is added to.
  • Patch quality: patch cannot be split into smaller pieces, its size must be reasonable.
  • Code quality: code is clean and readable, necessary developer documentation is added if needed.
  • Tests code quality: test set covers positive/negative scenarios, happy/edge cases. Tests are effective in terms of execution time and resources.

Notes

Copilot AI review requested due to automatic review settings April 3, 2026 19:06
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

This PR (IGNITE-28455) removes redundant volatile caching of local node identifiers/names and standardizes on using InternalClusterNode (and its id() / name()) directly across transaction, table, and replicator components.

Changes:

  • Remove cached localNodeId usage in TxManagerImpl and use localNode.id() directly.
  • Simplify TableManager constructor by removing the separate nodeName parameter and deriving names from localNode.
  • Refactor ReplicaManager / ReplicaStateManager to avoid volatile local-node fields by passing localNodeId via constructor and using localNode.name().

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
modules/transactions/src/main/java/org/apache/ignite/internal/tx/impl/TxManagerImpl.java Drops volatile localNodeId field; uses localNode.id() and makes helper listener static.
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java Removes nodeName field/ctor param; stores localNode and uses localNode.name() for thread naming and GC.
modules/table/src/test/java/org/apache/ignite/internal/table/distributed/TableManagerTest.java Updates TableManager construction to pass staticLocalNode() instead of node name string.
modules/table/src/test/java/org/apache/ignite/internal/table/distributed/TableManagerRecoveryTest.java Updates TableManager construction to pass node instead of separate node name + node args.
modules/runner/src/main/java/org/apache/ignite/internal/app/IgniteImpl.java Removes partitionRaftConfigurer field; keeps it as a local variable and updates TableManager construction to pass localNode.
modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItIgniteNodeRestartTest.java Updates TableManager construction to pass staticLocalNode().
modules/replicator/src/main/java/org/apache/ignite/internal/replicator/ReplicaStateManager.java Makes localNodeId final and constructor-provided; simplifies start() signature.
modules/replicator/src/main/java/org/apache/ignite/internal/replicator/ReplicaManager.java Removes volatile local node id/name fields; stores localNode from staticLocalNode() and uses it consistently.
modules/partition-replicator/src/integrationTest/java/org/apache/ignite/internal/partition/replicator/fixtures/Node.java Updates TableManager construction to pass staticLocalNode().
modules/distribution-zones/src/integrationTest/java/org/apache/ignite/internal/rebalance/ItRebalanceDistributedTest.java Updates TableManager construction to pass staticLocalNode().

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

@sashapolo sashapolo merged commit d3044b5 into apache:main Apr 6, 2026
5 checks passed
@sashapolo sashapolo deleted the ignite-28455 branch April 6, 2026 08:26
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