dengziming commented on PR #9766: URL: https://github.com/apache/kafka/pull/9766#issuecomment-2520313203
Hi, @chia7712 , Thanks for noticing this PR, I have rebased on trunk and the test looks fine. We have a controversy here that in the past the length of `EndTransactionMarker` is hard-coded to 6, however it is dynamically acquired from it's serialized ByteBuffer, so I stored buffer of a `EndTransactionMarker` when it's created, this will add some state but reduce one calculation. Another alternative is to change `MemoryRecords.writeEndTransactionalMarker` signature to directly receive (xxx..., ByteBuffer markerBuffer, ControlRecordType markerType) as the below screenshot, but this involves more refactor, WDYT.  -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
