kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dguy <...@git.apache.org>
Subject [GitHub] kafka pull request #2281: KAFKA-4561: Ordering of operations in StreamThread...
Date Tue, 20 Dec 2016 19:05:02 GMT
GitHub user dguy opened a pull request:

    https://github.com/apache/kafka/pull/2281

    KAFKA-4561: Ordering of operations in StreamThread.shutdownTasksAndState may void at-least-once
guarantees

    In `shutdownTasksAndState` and `suspendTasksAndState` we commit offsets BEFORE we flush
any state. This is wrong as if an exception occurs during a flush, we may violate the at-least-once
guarantees, that is we would have committed some offsets but NOT sent the processed data on
to other Sinks.
    Also during suspend and shutdown, we should try and complete all tasks even when exceptions
occur. We should just keep track of the exception and rethrow it at the end if necessary.
This helps with ensuring that StateStores etc are closed.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/dguy/kafka kafka-4561

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/kafka/pull/2281.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 #2281
    
----
commit e60f0d020d837f6c10406bdecd92d77a3b6c089b
Author: Damian Guy <damian.guy@gmail.com>
Date:   2016-12-20T18:59:14Z

    change ordering of suspend and shutdown in StreamThread so that we dont lose data. Always
try and run all the steps even if there are exceptions

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message