mirror of https://github.com/apache/kafka.git
Currently close() only awaits completion of pending produce requests. If there is a transaction ongoing, it may be dropped. For example, if one thread is calling commitTransaction() and another calls close(), then the commit may never happen even if the caller is willing to wait for it (by using a long timeout). What's more, the thread blocking in commitTransaction() will be stuck since the result will not be completed once the producer has shutdown. This patch ensures that 1) completing transactions are awaited, 2) ongoing transactions are aborted, and 3) pending callbacks are completed before close() returns. Reviewers: Jason Gustafson <jason@confluent.io> |
||
---|---|---|
.. | ||
.scalafmt.conf | ||
checkstyle.xml | ||
import-control-core.xml | ||
import-control.xml | ||
java.header | ||
suppressions.xml |