mirror of https://github.com/apache/kafka.git
MINOR: Add reason to exceptions in QuorumController (#13648)
Saw this error message in log: ERROR [QuorumController id=1] writeNoOpRecord: unable to start processing because of RejectedExecutionException. Reason: null (org.apache.kafka.controller.QuorumController) The null reason is not helpful with only RejectedExecutionException. Adding the reason to it. Reviewers: David Arthur <mumrah@gmail.com>, Divij Vaidya <diviv@amazon.com>, Manyanda Chitimbo <manyanda.chitimbo@gmail.com>
This commit is contained in:
parent
4773961a44
commit
21af1918ea
|
@ -245,12 +245,12 @@ public final class KafkaEventQueue implements EventQueue {
|
|||
continue;
|
||||
} else if (interrupted) {
|
||||
remove(eventContext);
|
||||
toDeliver = new InterruptedException();
|
||||
toDeliver = new InterruptedException("The event handler thread is interrupted");
|
||||
toRun = eventContext;
|
||||
continue;
|
||||
} else if (shuttingDown) {
|
||||
remove(eventContext);
|
||||
toDeliver = new RejectedExecutionException();
|
||||
toDeliver = new RejectedExecutionException("The event queue is shutting down");
|
||||
toRun = eventContext;
|
||||
continue;
|
||||
}
|
||||
|
@ -264,7 +264,7 @@ public final class KafkaEventQueue implements EventQueue {
|
|||
}
|
||||
} else {
|
||||
if (interrupted) {
|
||||
toDeliver = new InterruptedException();
|
||||
toDeliver = new InterruptedException("The event handler thread is interrupted");
|
||||
} else {
|
||||
toDeliver = null;
|
||||
}
|
||||
|
@ -300,10 +300,10 @@ public final class KafkaEventQueue implements EventQueue {
|
|||
lock.lock();
|
||||
try {
|
||||
if (shuttingDown) {
|
||||
return new RejectedExecutionException();
|
||||
return new RejectedExecutionException("The event queue is shutting down");
|
||||
}
|
||||
if (interrupted) {
|
||||
return new InterruptedException();
|
||||
return new InterruptedException("The event handler thread is interrupted");
|
||||
}
|
||||
OptionalLong existingDeadlineNs = OptionalLong.empty();
|
||||
if (eventContext.tag != null) {
|
||||
|
|
Loading…
Reference in New Issue