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);
|
leaderLifecycle.addManagedInstance(taskRunner);
|
||||||
Initialization.makeServiceDiscoveryClient(curator, serviceDiscoveryConfig, leaderLifecycle);
|
Initialization.makeServiceDiscoveryClient(curator, serviceDiscoveryConfig, leaderLifecycle);
|
||||||
leaderLifecycle.addManagedInstance(taskConsumer);
|
leaderLifecycle.addManagedInstance(taskConsumer);
|
||||||
leaderLifecycle.start();
|
|
||||||
|
|
||||||
leading = true;
|
leading = true;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
leaderLifecycle.start();
|
||||||
|
|
||||||
while (leading) {
|
while (leading) {
|
||||||
mayBeStopped.await();
|
mayBeStopped.await();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue