[
https://issues.apache.org/jira/browse/FLINK-39234?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated FLINK-39234:
-----------------------------------
Labels: pull-request-available (was: )
> KafkaWriterFaultToleranceITCase flakiness due to NotLeaderOrFollowerException
> -----------------------------------------------------------------------------
>
> Key: FLINK-39234
> URL: https://issues.apache.org/jira/browse/FLINK-39234
> Project: Flink
> Issue Type: Bug
> Components: Connectors / Kafka, Tests
> Reporter: Efrat Levitan
> Priority: Major
> Labels: pull-request-available
>
> tests in KafkaWriterFaultToleranceITCase fail due
> to`org.apache.kafka.common.errors.NotLeaderOrFollowerException` thrown
> instead of other expected exceptions:
> {code:java}
> 2026-03-09T20:53:50.7773820Z [ERROR]
> org.apache.flink.connector.kafka.sink.KafkaWriterFaultToleranceITCase.testFlushExceptionWhenKafkaUnavailable
> Time elapsed: 6.008 s <<< FAILURE!
> 2026-03-09T20:53:50.7775290Z java.lang.AssertionError:
> 2026-03-09T20:53:50.7775562Z
> 2026-03-09T20:53:50.7775908Z Expecting actual throwable to be an instance of
> any of the following types:
> 2026-03-09T20:53:50.7776654Z
> [org.apache.kafka.common.errors.NetworkException,
> 2026-03-09T20:53:50.7777307Z
> org.apache.kafka.common.errors.TimeoutException]
> 2026-03-09T20:53:50.7778036Z but was:
> 2026-03-09T20:53:50.7779801Z
> org.apache.kafka.common.errors.NotLeaderOrFollowerException: For requests
> intended only for the leader, this error indicates that the broker is not the
> current leader. For requests intended for any replica, this error indicates
> that the broker is not a replica of the topic partition.
> 2026-03-09T20:53:50.7788393Z
> 2026-03-09T20:53:50.7789580Z at
> org.apache.flink.connector.kafka.sink.KafkaWriterFaultToleranceITCase.testFlushExceptionWhenKafkaUnavailable(KafkaWriterFaultToleranceITCase.java:93)
> 2026-03-09T20:53:50.7792426Z at
> java.base/java.lang.reflect.Method.invoke(Method.java:566)
> 2026-03-09T20:53:50.7793169Z at
> java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
> 2026-03-09T20:53:50.7793939Z at
> java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
> {code}
> example failure
> https://github.com/apache/flink-connector-kafka/actions/runs/22686855351/job/66358437651?pr=234
--
This message was sent by Atlassian Jira
(v8.20.10#820010)