Skip to content

IGNITE-27118 Fix rolling upgrade disabling#12522

Merged
timoninmaxim merged 9 commits intoapache:masterfrom
chesnokoff:ignite-27118
Nov 25, 2025
Merged

IGNITE-27118 Fix rolling upgrade disabling#12522
timoninmaxim merged 9 commits intoapache:masterfrom
chesnokoff:ignite-27118

Conversation

@chesnokoff
Copy link
Copy Markdown
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 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.

}

/** */
private GridLocalEventListener discoListener() {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

inline this method in addLocalEventListener

@Override public void onEvent(Event evt) {
assert evt instanceof DiscoveryEvent;

assert evt.type() == EVT_NODE_LEFT || evt.type() == EVT_NODE_FAILED;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

JOINED event also should be handled there

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I had a hypothesis that there might be a gap between sending the EVT_NODE_JOINED event and the moment when the joining node is added to the ring. In that case, rolling upgrade could be disabled while a node with a different version is still joining.

However, ServerImpl.RingMessageWorker#processNodeAddFinishedMessage checks that the ring already contains the node before sending EVT_NODE_JOINED, so this situation cannot occur and this part works as expected.


ClusterNode lastJoiningNode = RollingUpgradeProcessor.this.lastJoiningNode;

if (lastJoiningNode == null || !lastJoiningNode.id().equals(nodeId))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You can't access lastJoiningNode without sync block. Let's keep the underlying check and this can be removed

@chesnokoff chesnokoff changed the title IGNITE-27118 IGNITE-27118 Fix disabling rolling upgrade Nov 24, 2025
@chesnokoff chesnokoff changed the title IGNITE-27118 Fix disabling rolling upgrade IGNITE-27118 Fix rolling upgrade disabling Nov 24, 2025
UUID nodeId = ((DiscoveryEvent)evt).eventNode().id();

synchronized (lock) {
if (RollingUpgradeProcessor.this.lastJoiningNode != null
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

no need specify RollingUpgradeProcessor.this

* Disables rolling upgrade.
* This method can only be called on coordinator node.
*
* <p>May be blocked while a node with a different version is still joining.</p>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Metastorage operations are blocking also

@sonarqubecloud
Copy link
Copy Markdown

@timoninmaxim timoninmaxim merged commit 08e5ab4 into apache:master Nov 25, 2025
9 checks passed
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