[ 
https://issues.apache.org/jira/browse/CASSANDRA-15773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17100695#comment-17100695
 ] 

Stephen Mallette commented on CASSANDRA-15773:
----------------------------------------------

[~dcapwell] thanks for the feedback:

> Since we don't free, and the metric is how many chunks are leant out, >= 
> totalBytesRequestedFromPool should hold true and would be more accurate than 
> > 0

yes - that sounds smart to me - I've made that change.

> the test makes an assumption at buffer pool size, which may not be true in CI,

I've initialized the test with a fixed size to the pool: 
https://github.com/apache/cassandra/compare/trunk...spmallette:CASSANDRA-15773-trunk#diff-790a43fcd6ed69f4122cd0fe205c847bR48-R52

> leaking, should cleanup after the test is over; same for the other test

I might not understand something but I thought that this would prevent such 
problems:

https://github.com/apache/cassandra/compare/trunk...spmallette:CASSANDRA-15773-trunk#diff-790a43fcd6ed69f4122cd0fe205c847bR54-R58

which effectively calls:

{code}
    static void unsafeReset()
    {
        localPool.get().unsafeRecycle();
        globalPool.unsafeFree();
    }
{code}

on {{BufferPool}} itself. Do I need to do something more?



> Add test to cover metrics related to the BufferPool
> ---------------------------------------------------
>
>                 Key: CASSANDRA-15773
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-15773
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Test/unit
>            Reporter: Stephen Mallette
>            Assignee: Stephen Mallette
>            Priority: Normal
>
> At this time there do not appear to be unit tests to validate 
> {{BufferPoolMetrics}}.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to