hello
Recently I was studying the kafka producer code, I find  if
enable  compressed,allocate memory buffer from buffer pool  and check if
recordBatch is full use the records uncompressed size。not after compressed
size。

This will cause a batch to be sent when there may still be a lot of free
space in the memoryBuffer.Or when sending a large message, the bufferPool
has insufficient space and is blocked.

Therefore, I would like to ask why not use the compressed size to allocate
space and calculate whether the Recordbatch is full.

thanks

Reply via email to