mirror of https://github.com/apache/druid.git
Merge pull request #1224 from metamx/alert-improve
skip raising false alert when the coordinator looses leadership
This commit is contained in:
commit
44e23a8267
|
@ -86,6 +86,7 @@ public class LoadQueuePeon
|
||||||
private final Object lock = new Object();
|
private final Object lock = new Object();
|
||||||
|
|
||||||
private volatile SegmentHolder currentlyProcessing = null;
|
private volatile SegmentHolder currentlyProcessing = null;
|
||||||
|
private boolean stopped = false;
|
||||||
|
|
||||||
LoadQueuePeon(
|
LoadQueuePeon(
|
||||||
CuratorFramework curator,
|
CuratorFramework curator,
|
||||||
|
@ -209,9 +210,12 @@ public class LoadQueuePeon
|
||||||
{
|
{
|
||||||
synchronized (lock) {
|
synchronized (lock) {
|
||||||
try {
|
try {
|
||||||
|
// expected when the coordinator looses leadership and LoadQueuePeon is stopped.
|
||||||
if (currentlyProcessing == null) {
|
if (currentlyProcessing == null) {
|
||||||
log.makeAlert("Crazy race condition! server[%s]", basePath)
|
if(!stopped) {
|
||||||
.emit();
|
log.makeAlert("Crazy race condition! server[%s]", basePath)
|
||||||
|
.emit();
|
||||||
|
}
|
||||||
actionCompleted();
|
actionCompleted();
|
||||||
doNext();
|
doNext();
|
||||||
return;
|
return;
|
||||||
|
@ -347,6 +351,7 @@ public class LoadQueuePeon
|
||||||
|
|
||||||
queuedSize.set(0L);
|
queuedSize.set(0L);
|
||||||
failedAssignCount.set(0);
|
failedAssignCount.set(0);
|
||||||
|
stopped = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue