[
https://issues.apache.org/jira/browse/FLINK-5701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15926437#comment-15926437
]
ASF GitHub Bot commented on FLINK-5701:
---------------------------------------
GitHub user tzulitai opened a pull request:
https://github.com/apache/flink/pull/3549
[FLINK-5701] [kafka] FlinkKafkaProducer should check asyncException on
checkpoints
This is a backport of FLINK-5701 for `release-1.1`.
The added tests are identical to #3278, with only minor changes to fit with
the state of the producer in the `release-1.1` branch.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/tzulitai/flink FLINK-5701-1.1
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/3549.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #3549
----
commit e4d9a14dc45200c00806377cdd34f551870213ef
Author: Tzu-Li (Gordon) Tai <[email protected]>
Date: 2017-03-15T16:05:51Z
[FLINK-5701] [kafka] FlinkKafkaProducer should check asyncException on
checkpoints
----
> FlinkKafkaProducer should check asyncException on checkpoints
> -------------------------------------------------------------
>
> Key: FLINK-5701
> URL: https://issues.apache.org/jira/browse/FLINK-5701
> Project: Flink
> Issue Type: Bug
> Components: Kafka Connector, Streaming Connectors
> Reporter: Tzu-Li (Gordon) Tai
> Assignee: Tzu-Li (Gordon) Tai
> Priority: Critical
> Fix For: 1.3.0, 1.2.1
>
>
> Reported in ML:
> http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Fink-KafkaProducer-Data-Loss-td11413.html
> The problem:
> The producer holds a {{pendingRecords}} value that is incremented on each
> invoke() and decremented on each callback, used to check if the producer
> needs to sync on pending callbacks on checkpoints.
> On each checkpoint, we should only consider the checkpoint succeeded iff
> after flushing the {{pendingRecords == 0}} and {{asyncException == null}}
> (currently, we’re only checking {{pendingRecords}}).
> A quick fix for this is to check and rethrow async exceptions in the
> {{snapshotState}} method both before and after flushing and
> {{pendingRecords}} becomes 0.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)