timoninmaxim commented on code in PR #12522:
URL: https://github.com/apache/ignite/pull/12522#discussion_r2546056595
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/rollingupgrade/RollingUpgradeProcessor.java:
##########
@@ -320,4 +328,31 @@ private boolean checkVersionsForEnabling(
return true;
}
+
+ /** */
+ private GridLocalEventListener discoListener() {
+ return new GridLocalEventListener() {
+ @Override public void onEvent(Event evt) {
+ assert evt instanceof DiscoveryEvent;
+
+ assert evt.type() == EVT_NODE_LEFT || evt.type() ==
EVT_NODE_FAILED;
+
+ DiscoveryEvent discoEvt = (DiscoveryEvent)evt;
+
+ UUID nodeId = discoEvt.eventNode().id();
+
+ ClusterNode lastJoiningNode =
RollingUpgradeProcessor.this.lastJoiningNode;
+
+ if (lastJoiningNode == null ||
!lastJoiningNode.id().equals(nodeId))
Review Comment:
You can't access lastJoiningNode without sync block. Let's keep the
underlying check and this can be removed
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/rollingupgrade/RollingUpgradeProcessor.java:
##########
@@ -320,4 +328,31 @@ private boolean checkVersionsForEnabling(
return true;
}
+
+ /** */
+ private GridLocalEventListener discoListener() {
Review Comment:
inline this method in `addLocalEventListener`
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/rollingupgrade/RollingUpgradeProcessor.java:
##########
@@ -320,4 +328,31 @@ private boolean checkVersionsForEnabling(
return true;
}
+
+ /** */
+ private GridLocalEventListener discoListener() {
+ return new GridLocalEventListener() {
+ @Override public void onEvent(Event evt) {
+ assert evt instanceof DiscoveryEvent;
+
+ assert evt.type() == EVT_NODE_LEFT || evt.type() ==
EVT_NODE_FAILED;
Review Comment:
JOINED event also should be handled there
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]