[
https://issues.apache.org/jira/browse/CASSANDRA-9669?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14702841#comment-14702841
]
Benedict commented on CASSANDRA-9669:
-------------------------------------
bq. 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)?
You mean the global position, I assume? I wasn't really sure the best thing to
do here, since it's a major performance optimisation to skip large chunks of
commit log. I'm not so sure about regressing 2.0 replay for a border case
during replay of a fresh table, when we've been so broken for all tables. I'm
also reticent to make more changes than absolutely necessary; tracking the
commit log replay position at construction of a table would be the better
solution, but I would rather wait until 3.0+ for that.
I'm working on improving the comments as well as addressing the other issues.
> 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)