mirror of https://github.com/apache/druid.git
1) Fix bug with Master stopping trying to be Master after he losses it once
This commit is contained in:
parent
67be515db6
commit
a949f1672d
|
@ -57,6 +57,7 @@ import org.joda.time.DateTime;
|
||||||
import org.joda.time.Duration;
|
import org.joda.time.Duration;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -473,6 +474,13 @@ public class DruidMaster
|
||||||
|
|
||||||
stopBeingMaster();
|
stopBeingMaster();
|
||||||
|
|
||||||
|
try {
|
||||||
|
leaderLatch.get().close();
|
||||||
|
}
|
||||||
|
catch (IOException e) {
|
||||||
|
log.warn(e, "Unable to close leaderLatch, ignoring");
|
||||||
|
}
|
||||||
|
|
||||||
started = false;
|
started = false;
|
||||||
|
|
||||||
exec.shutdownNow();
|
exec.shutdownNow();
|
||||||
|
@ -558,8 +566,6 @@ public class DruidMaster
|
||||||
try {
|
try {
|
||||||
log.info("I am no longer the master...");
|
log.info("I am no longer the master...");
|
||||||
|
|
||||||
leaderLatch.get().close();
|
|
||||||
|
|
||||||
for (String server : loadManagementPeons.keySet()) {
|
for (String server : loadManagementPeons.keySet()) {
|
||||||
LoadQueuePeon peon = loadManagementPeons.remove(server);
|
LoadQueuePeon peon = loadManagementPeons.remove(server);
|
||||||
peon.stop();
|
peon.stop();
|
||||||
|
|
Loading…
Reference in New Issue