mcvsubbu commented on a change in pull request #3604: Add
ControllerLeadershipManager as single place to check controller leadership
changes
URL: https://github.com/apache/incubator-pinot/pull/3604#discussion_r240732086
##########
File path:
pinot-controller/src/main/java/com/linkedin/pinot/controller/helix/core/realtime/PinotRealtimeSegmentManager.java
##########
@@ -101,12 +101,7 @@ public void start(ControllerMetrics controllerMetrics) {
_zkClient.subscribeDataChanges(_tableConfigPath, this);
// Subscribe to leadership changes
- _pinotHelixResourceManager.getHelixZkManager().addControllerListener(new
ControllerChangeListener() {
- @Override
- public void onControllerChange(NotificationContext changeContext) {
- processPropertyStoreChange(CONTROLLER_LEADER_CHANGE);
- }
- });
+
ControllerLeadershipManager.getInstance().subscribe(PinotLLCRealtimeSegmentManager.class.getName(),
this);
Review comment:
Good point. All registrations should happen before we listen to becoming
leader
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]