dajac commented on code in PR #20847:
URL: https://github.com/apache/kafka/pull/20847#discussion_r2577686742
##########
clients/src/main/java/org/apache/kafka/common/utils/BufferSupplier.java:
##########
@@ -30,6 +31,7 @@
* iterating over the records in the batch.
*/
public abstract class BufferSupplier implements AutoCloseable {
+ protected final AtomicLong cachedSize = new AtomicLong();
Review Comment:
Given that we only cache one buffer per context, I wonder if we could do the
bookkeeping there. Have you considered it?
--
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]