chia7712 commented on code in PR #20847:
URL: https://github.com/apache/kafka/pull/20847#discussion_r2571675923
##########
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:
The cached size refers to the total size of all cached buffers. This value
is exposed as a metric to help users tweak the
group.coordinator.append.max.buffer.size setting
Another approach is to calculate the cached size on demand, which would
eliminate the need to store the count. This is probably acceptable since we
don't cache a large number of buffers.
--
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]