mirror of https://github.com/apache/kafka.git
KAFKA-13728: fix PushHttpMetricsReporter no longer pushes metrics when network failure is recovered. (#11879)
The class PushHttpMetricsReporter no longer pushes metrics when network failure is recovered. I debugged the code and found the problem here: when we submit a task to the ScheduledThreadPoolExecutor that needs to be executed periodically, if the task throws an exception and is not swallowed, the task will no longer be scheduled to execute. So when an IO exception occasionally occurs on the network, we should swallow it rather than throw it in task HttpReporter. Reviewers: Guozhang Wang <wangguoz@gmail.com>
This commit is contained in:
parent
8d6968e832
commit
6145974fef
|
@ -213,7 +213,6 @@ public class PushHttpMetricsReporter implements MetricsReporter {
|
|||
}
|
||||
} catch (Throwable t) {
|
||||
log.error("Error reporting metrics", t);
|
||||
throw new KafkaException("Failed to report current metrics", t);
|
||||
} finally {
|
||||
if (connection != null) {
|
||||
connection.disconnect();
|
||||
|
|
Loading…
Reference in New Issue