IGNITE-27118 Fix rolling upgrade disabling#12522
Conversation
| } | ||
|
|
||
| /** */ | ||
| private GridLocalEventListener discoListener() { |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
JOINED event also should be handled there
There was a problem hiding this comment.
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)) |
There was a problem hiding this comment.
You can't access lastJoiningNode without sync block. Let's keep the underlying check and this can be removed
| UUID nodeId = ((DiscoveryEvent)evt).eventNode().id(); | ||
|
|
||
| synchronized (lock) { | ||
| if (RollingUpgradeProcessor.this.lastJoiningNode != null |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
Metastorage operations are blocking also
|



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
The description explains WHAT and WHY was made instead of HOW.
The following pattern must be used:
IGNITE-XXXX Change summarywhereXXXX- number of JIRA issue.(see the Maintainers list)
the
green visaattached 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.