dajac commented on code in PR #20847:
URL: https://github.com/apache/kafka/pull/20847#discussion_r2570881637


##########
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:
   I am not really comfortable with this change. We have buffer suppliers 
pooling buffers. What does the size mean? It seems to me that we are pushing a 
weird concept in BufferSupplier here. Do we really need it? As we use a single 
buffer per context in the runtime, can't we take the size when we have the 
buffer? I may be missing something though. I need to take a deeper look.



-- 
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]

Reply via email to