You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "戈震 (Jira)" <ji...@apache.org> on 2021/04/08 08:23:00 UTC
[jira] [Created] (KAFKA-12632) Exception may missed when source
task failing
戈震 created KAFKA-12632:
--------------------------
Summary: Exception may missed when source task failing
Key: KAFKA-12632
URL: https://issues.apache.org/jira/browse/KAFKA-12632
Project: Kafka
Issue Type: Bug
Components: KafkaConnect
Affects Versions: 2.6.1
Reporter: 戈震
When task get a exception, it will jump out of while block and call method commitOffsets() in finally block in method org.apache.kafka.connect.runtime.WorkerSourceTask.execute().
But if there is a exception thrown in commitOffsets(), the origin exception instance will be missed.
{code:java}
//代码占位符
package org.apache.kafka.connect.runtime;
class WorkerSourceTask extends WorkerTask {
@Override
public void execute() {
try {
// throw some exception.
} catch (InterruptedException e) {
} finally {
// if some exception thrown in this method, the origin exception will be missed
commitOffsets();
}
}
}
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)