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

Branimir Lambov commented on CASSANDRA-9669:
--------------------------------------------

Should we really ignore the timespan before the first known sstable interval? 
This can break correct replay for a fresh table, can't it (if the first two 
flushes are initiated close together and the node dies after the latter 
completes early)?

{{CompactionManager.instance.submitBackground(cfstore)}} in 
[permitCompactionOfFlush|https://github.com/apache/cassandra/compare/trunk...belliottsmith:9669-2.0#diff-06edf300ef64021a42929f19d0cfba3bR185]
 is new and appears to be a change in behaviour. Could you explain in a comment 
why it is now necessary?

[SSTableMetadata.deserialize|https://github.com/apache/cassandra/compare/trunk...belliottsmith:9669-2.0#diff-0c40f7e67fc53dd15d5fe193e55b2b04R494]:
 is there a reason to pass {{hasCommitLogLowerBound}} around separately when it 
always matches the one in the passed descriptor?

> If sstable flushes complete out of order, on restart we can fail to replay 
> necessary commit log records
> -------------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-9669
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9669
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Benedict
>            Assignee: Benedict
>            Priority: Critical
>              Labels: correctness
>             Fix For: 3.x, 2.1.x, 2.2.x, 3.0.x
>
>
> While {{postFlushExecutor}} ensures it never expires CL entries out-of-order, 
> on restart we simply take the maximum replay position of any sstable on disk, 
> and ignore anything prior. 
> It is quite possible for there to be two flushes triggered for a given table, 
> and for the second to finish first by virtue of containing a much smaller 
> quantity of live data (or perhaps the disk is just under less pressure). If 
> we crash before the first sstable has been written, then on restart the data 
> it would have represented will disappear, since we will not replay the CL 
> records.
> This looks to be a bug present since time immemorial, and also seems pretty 
> serious.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to