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

Jordan West commented on CASSANDRA-20551:
-----------------------------------------

[~benedict] took your suggestion, thanks. 

Test run 
[here|https://app.circleci.com/pipelines/github/jrwest/cassandra/243/workflows/b7433c7a-96d1-4044-8ef4-c10b11c66c5b]

> ThreadLocalReadAheadBuffer shouldn't allocate on close if nothing is allocated
> ------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-20551
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-20551
>             Project: Apache Cassandra
>          Issue Type: Improvement
>          Components: Local/Compaction
>            Reporter: Jordan West
>            Assignee: Jordan West
>            Priority: Normal
>         Attachments: image-2025-04-15-16-59-14-067.png, screenshot-1.png
>
>
> Post the merge of CASSANDRA-15452 it was noticed that in 
> {{ThreadLocalReadAheadBuffer#close()}} that we allocate a buffer even when 
> not necessary. We can avoid this by not calling {{getBlock()}} and instead 
> calling {{block()}} and returning early if the buffer is null. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to