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

Andres de la Peña commented on CASSANDRA-16878:
-----------------------------------------------

The proposed patch uses an {{OpOrder}} to guarantee the ordering of the 
replayed mutations:
||PR||CI||
|[3.0|https://github.com/apache/cassandra/pull/1165]|[j8|https://app.circleci.com/pipelines/github/adelapena/cassandra/792/workflows/bfd8ea56-02e7-4280-a60d-ff29a7424b1b]|
|[3.11|https://github.com/apache/cassandra/pull/1166]|[j8|https://app.circleci.com/pipelines/github/adelapena/cassandra/791/workflows/8643004d-e29f-4454-b9dd-7eed069637d6]|
|[4.0|https://github.com/apache/cassandra/pull/1167]|[j8|https://app.circleci.com/pipelines/github/adelapena/cassandra/794/workflows/b5efb584-923f-4533-be16-4554c2778970]
 
[j11|https://app.circleci.com/pipelines/github/adelapena/cassandra/794/workflows/faca9ef5-a2cd-402c-8053-1bad21c6d2e3]|
|[trunk|https://github.com/apache/cassandra/pull/1168]|[j8|https://app.circleci.com/pipelines/github/adelapena/cassandra/793/workflows/f0c242f5-74eb-46c5-89ef-cafc9d4ea7f2]
 
[j11|https://app.circleci.com/pipelines/github/adelapena/cassandra/793/workflows/04976837-6c7c-4eb2-9945-19cdf95ba4d9]|
|[dtest|https://github.com/apache/cassandra-dtest/pull/155]|

All praise and glory to [~fcofdezc], who is the original author of the patch.

> Race in commit log replay can cause rejected mutations
> ------------------------------------------------------
>
>                 Key: CASSANDRA-16878
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-16878
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Andres de la Peña
>            Assignee: Andres de la Peña
>            Priority: Normal
>
> We don't force order in the execution of replayed mutations and hence a 
> mutation can move ahead of or behind a schema change it relies on (e.g. 
> added/removed column), which can then cause it to be rejected because of a 
> schema mismatch.
> To fix this, we need to identify schema mutations and make sure the log 
> enforces their execution after all previous mutations have completed and 
> before anything following is started.
> Schema mutations are 
> [flushed|https://github.com/apache/cassandra/blob/cassandra-4.0.0/src/java/org/apache/cassandra/schema/SchemaKeyspace.java#L1266-L1271]
>  after being applied, so this only would be a problem if the node abruptly 
> stops before flushing the schema mutation.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to