KAFKA-19551: Remove the handling of FatalExitError in RemoteStorageThreadPool (#20245)
CI / build (push) Waiting to run Details

FatalExitError is not thrown after
[KAFKA-19425](https://issues.apache.org/jira/browse/KAFKA-19425). Clean
up the handling of FatalExitError in `RemoteStorageThreadPool`.
This commit is contained in:
Lan Ding 2025-07-28 20:19:45 +08:00 committed by GitHub
parent e61c297b73
commit dfced692d2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 10 deletions

View File

@ -16,8 +16,6 @@
*/
package org.apache.kafka.storage.internals.log;
import org.apache.kafka.common.internals.FatalExitError;
import org.apache.kafka.common.utils.Exit;
import org.apache.kafka.common.utils.ThreadUtils;
import org.apache.kafka.server.metrics.KafkaMetricsGroup;
@ -55,14 +53,8 @@ public final class RemoteStorageThreadPool extends ThreadPoolExecutor {
@Override
protected void afterExecute(Runnable runnable, Throwable th) {
if (th != null) {
if (th instanceof FatalExitError) {
LOGGER.error("Stopping the server as it encountered a fatal error.");
Exit.exit(((FatalExitError) th).statusCode());
} else {
if (!isShutdown())
LOGGER.error("Error occurred while executing task: {}", runnable, th);
}
if (th != null && !isShutdown()) {
LOGGER.error("Error occurred while executing task: {}", runnable, th);
}
}