jiajunwang commented on a change in pull request #1753:
URL: https://github.com/apache/helix/pull/1753#discussion_r640027280
##########
File path:
helix-core/src/main/java/org/apache/helix/participant/DistClusterControllerStateModel.java
##########
@@ -85,7 +85,7 @@ public void onBecomeStandbyFromLeader(Message message,
NotificationContext conte
logger.info(controllerName + " becoming standby from leader for " +
clusterName);
- if (_controller != null) {
+ if (_controllerOpt.isPresent()) {
Review comment:
That would be fine. Your concern is basically
"onBecomeLeaderFromStandby" and "onBecomeStandbyFromLeader" are called at the
same time. But even with Xiaoyuan's change, this is not possible, right?
If the reset is triggered by the other logic, like shutdown, then we have
synchronized (_controllerOpt) in reset() to ensure the calls are mutually
exclusive.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]