[ 
https://issues.apache.org/jira/browse/CASSANDRA-21815?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Francisco Guerrero updated CASSANDRA-21815:
-------------------------------------------
    Reviewers: Dmitry Konstantinov, Francisco Guerrero  (was: Dmitry 
Konstantinov)
       Status: Review In Progress  (was: Needs Committer)

> 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.0.x, 4.1.x, 5.0.x, 6.0.x, 7.x
>
>         Attachments: image-2026-10-27-12-11-41-148.png
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> We recently started to track the off-heap memory usage for both chunk pool 
> and network pool but the metric seems broken (running fork on 4.1.10)
> !image-2026-10-27-12-11-41-148.png!
> 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]

Reply via email to