[ https://issues.apache.org/jira/browse/CASSANDRA-12888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15655175#comment-15655175 ]
Blake Eggleston commented on CASSANDRA-12888: --------------------------------------------- bq. How about keeping the streamed sstables, and having a special mutation.apply path that only writes to the commit log/CDC and apply MVs That does seem like it would be the simplest way to do it. You'd just need to skip [this loop|https://github.com/bdeggleston/cassandra/blob/0a1f1c81e641039ca9fd573d5217b6b6f2ad8fb8/src/java/org/apache/cassandra/db/Keyspace.java#L584-L584]. When those commit log entries get replayed on startup though, you'll have repaired data leak into unrepaired (or at least be duplicated there), causing data to be re-streamed on the next repair. You could avoid that with a 'cdc-only' flag on the commit log entry though. > Incremental repairs broken for MVs and CDC > ------------------------------------------ > > Key: CASSANDRA-12888 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12888 > Project: Cassandra > Issue Type: Bug > Components: Streaming and Messaging > Reporter: Stefan Podkowinski > Priority: Critical > > SSTables streamed during the repair process will first be written locally and > afterwards either simply added to the pool of existing sstables or, in case > of existing MVs or active CDC, replayed on mutation basis: > As described in {{StreamReceiveTask.OnCompletionRunnable}}: > {quote} > We have a special path for views and for CDC. > For views, since the view requires cleaning up any pre-existing state, we > must put all partitions through the same write path as normal mutations. This > also ensures any 2is are also updated. > For CDC-enabled tables, we want to ensure that the mutations are run through > the CommitLog so they can be archived by the CDC process on discard. > {quote} > Using the regular write path turns out to be an issue for incremental > repairs, as we loose the {{repaired_at}} state in the process. Eventually the > streamed rows will end up in the unrepaired set, in contrast to the rows on > the sender site moved to the repaired set. The next repair run will stream > the same data back again, causing rows to bounce on and on between nodes on > each repair. > See linked dtest on steps to reproduce. An example for reproducing this > manually using ccm can be found > [here|https://gist.github.com/spodkowinski/2d8e0408516609c7ae701f2bf1e515e8] -- This message was sent by Atlassian JIRA (v6.3.4#6332)