I can definitely see the benefits of moving allocation here, however doing this 
would require to change from `lazy val buffer` to `var buffer` in 
[L513](https://github.com/apache/kafka/blob/4a97eafda55c369763fba9a7b3e81aa2f59dd59f/core/src/main/scala/kafka/coordinator/group/GroupMetadataManager.scala#L513).

This means allocating `buffer` even if it it not needed (in case 
`fetchDataInfo.records` are `MemoryRecords`, the buffer is not allocated).
That should not be a big deal to have this buffer pre-allocated every time and 
grow it if needed, just wanted to point out the "downsides" of the approach.
Do you have any opinion @dhruvilshah3 ? 🙂

[ Full content available at: https://github.com/apache/kafka/pull/5500 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to