mirror of https://github.com/apache/druid.git
TaskMasterLifecycle: Stop leaderLifecycle if it dies while starting
This commit is contained in:
parent
18daa19fc9
commit
de4fc98128
|
@ -94,11 +94,12 @@ public class TaskMasterLifecycle
|
|||
leaderLifecycle.addManagedInstance(taskRunner);
|
||||
Initialization.makeServiceDiscoveryClient(curator, serviceDiscoveryConfig, leaderLifecycle);
|
||||
leaderLifecycle.addManagedInstance(taskConsumer);
|
||||
leaderLifecycle.start();
|
||||
|
||||
leading = true;
|
||||
|
||||
try {
|
||||
leaderLifecycle.start();
|
||||
|
||||
while (leading) {
|
||||
mayBeStopped.await();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue