[
https://issues.apache.org/jira/browse/CASSANDRA-3411?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13154578#comment-13154578
]
Jonathan Ellis commented on CASSANDRA-3411:
-------------------------------------------
One more concern. I'm not a huge fan of END_OF_SEGMENT_MARKER:
- Zero is a very common value. With a recycled log, it doesn't seem impossible
to me that we'd encounter a zero in a partially synced record prematurely
- More generally, writing a value and then seeking back feels like a bug
waiting to happen (if we forget the seek-back step)
- Finally and most importantly, the marker approach generalizes poorly to
CASSANDRA-622 (should we ever bite that bullet)
The postgresql approach addresses these without much complexity: add an
incrementing transaction id to each record, and if we encounter a lower
transaction id than the previous on replay, then that's the end of segment.
> 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,
> 006-pre-allocated-recycled-commitlog-segment-files-CASSANDRA-3411.patch,
> 3411-cleaned.txt, 3411-v5.txt, 3411-v6-retry.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