kafka/checkstyle
Jason Gustafson 299eea88a5
KAFKA-12870; Flush in progress not cleared after transaction completion (#10880)
We had been using `RecordAccumulator.beginFlush` in order to force the `RecordAccumulator` to flush pending batches when a transaction was being completed. Internally, `RecordAccumulator` has a simple counter for the number of flushes in progress. The count gets incremented in `beginFlush` and it is expected to be decremented by `awaitFlushCompletion`. The second call to decrement the counter never happened in the transactional path, so the counter could get stuck at a positive value, which means that the linger time would effectively be ignored.

This patch fixes the problem by removing the use of `beginFlush` in `Sender`. Instead, we now add an additional condition in `RecordAccumulator` to explicitly check when a transaction is being completed. 

Reviewers: Guozhang Wang <wangguoz@gmail.com>
2021-06-18 15:50:49 -07:00
..
.scalafmt.conf MINOR: Add Scalafmt to Streams Scala API (#4965) 2018-07-09 16:48:34 -07:00
checkstyle.xml KAFKA-12375: don't reuse thread.id until a thread has fully shut down (#10215) 2021-03-02 16:28:15 -08:00
import-control-core.xml KAFKA-12758 Added `server-common` module to have server side common classes. (#10638) 2021-05-11 09:58:28 -07:00
import-control-jmh-benchmarks.xml MINOR: Replace BrokerStates.scala with BrokerState.java (#10028) 2021-02-03 13:41:38 -08:00
import-control.xml KAFKA-12945: Remove port, host.name and related configs in 3.0 (#10872) 2021-06-17 05:32:34 -07:00
java.header MINOR: improve license header check by providing head file instead of (prefix) header regex 2017-02-28 12:35:04 -08:00
suppressions.xml KAFKA-12870; Flush in progress not cleared after transaction completion (#10880) 2021-06-18 15:50:49 -07:00