[
https://issues.apache.org/jira/browse/CASSANDRA-21815?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Yuqi Yan updated CASSANDRA-21815:
---------------------------------
Attachment: image-2026-10-27-12-11-41-148.png
> Networking BufferPool overflow size can become negative
> -------------------------------------------------------
>
> Key: CASSANDRA-21815
> URL: https://issues.apache.org/jira/browse/CASSANDRA-21815
> Project: Apache Cassandra
> Issue Type: Bug
> Components: Observability/Metrics
> Reporter: Yuqi Yan
> Assignee: Yuqi Yan
> Priority: Normal
> Fix For: 4.1.x, 5.0.x, 6.0.x, 7.x
>
> Attachments: image-2026-10-27-12-11-41-148.png
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> BufferPool.putUnusedPortion[1] on an unpooled (overflow) buffer subtracts
> (capacity - limit) from overflowMemoryUsage without freeing or shrinking the
> buffer. A later put then subtracts the full capacity again [2], so the
> counter ends at limit - capacity (negative).
> [1]
> [https://github.com/apache/cassandra/blob/772c44c8d67898afb6d007dcd01ba0795f652a29/src/java/org/apache/cassandra/utils/memory/BufferPool.java#L881-L890]
> [2]
> [https://github.com/apache/cassandra/blob/772c44c8d67898afb6d007dcd01ba0795f652a29/src/java/org/apache/cassandra/utils/memory/BufferPool.java#L815-L823]
>
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]