mirror of https://github.com/apache/kafka.git
When flush is called a copy of incomplete batches is made. This means that the full ProducerBatch(s) are held in memory until the flush has completed. Note that the `Sender` removes producer batches from the original incomplete collection when they're no longer needed. For batches where the existing memory pool is used this is not as wasteful as the memory will be returned to the pool, but for non pool memory it can only be GC'd after the flush has completed. Rather than use copyAll we can make a new array with only the produceFuture(s) and await on those. Reviewers: Chia-Ping Tsai <chia7712@gmail.com>, Ismael Juma <ismael@juma.me.uk> |
||
|---|---|---|
| .. | ||
| src | ||
| .gitignore | ||