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

Rick Branson commented on CASSANDRA-3411:
-----------------------------------------

Recycling the replayed segments is a good idea. Very elegant.

I wasn't quite sure how strict the cap limit was -- 004 tries to hit the cap 
with a "best effort" and doesn't really treat it as a hard limit. If it's 
strict-in-bold it definitely needs to be reworked. CommitLog should detect a 
potential overflow before it even allows the write to take place and "stop the 
world" to perform a flush.

submitCreateFreshSegment was an oversight for sure, a refactor relic.

CLS.recycle() returning a new CLS is more of a preference than anything else -- 
I tend to reach for more immutability when it doesn't hurt, and overall it 
seemed to be a cleaner approach than reseting the state.

You have a good point about the order of shutdownBlocking, and actually, is the 
sync() even necessary here or is it cargo cult? 
                
> Pre-allocated, Recycled Commitlog Segment Files
> -----------------------------------------------
>
>                 Key: CASSANDRA-3411
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3411
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Rick Branson
>            Priority: Minor
>         Attachments: 
> 001-pre-allocated-recycled-commitlog-segment-files-CASSANDRA-3411.patch, 
> 003-pre-allocated-recycled-commitlog-segment-files-CASSANDRA-3411.patch, 
> 004-pre-allocated-recycled-commitlog-segment-files-CASSANDRA-3411.patch, 
> 3411-cleaned.txt, 3411-v5.txt
>
>
> An approach for improving commitlog performance is to pre-allocate the full 
> 128MB segment files and reuse them once all the mutations have been flushed. 
> Pre-allocation allows writes to be performed without modifying the file size 
> metadata, and should (in theory) allow the filesystem to allocate a 
> contiguous block of space for the file. Recycling the segment files prevents 
> the overhead of pre-allocation from impacting overall performance.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to