You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Andres de la Peña (Jira)" <ji...@apache.org> on 2022/02/01 12:46:00 UTC

[jira] [Commented] (CASSANDRA-16878) Race in commit log replay can cause rejected mutations

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

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

Great, thanks. I have made some changes in the test, mainly to changes on visibility in non-test classes, unneeded changes on {{{}MigrationManager{}}}, and adding the wait for replayed mutations. I haven't added the extra test to 3.0 nor 3.11 because the code for schema diff is quite different and we already have the dtest.

Here are the updated and rebased patches, CI is running with repeated runs for the new tests:
||PR||CI||
|[3.0 |https://github.com/apache/cassandra/pull/1165]|[j8|https://app.circleci.com/pipelines/github/adelapena/cassandra/1271/workflows/32fa0fe2-d37c-481c-803c-21782d8f2496]|
|[3.11 |https://github.com/apache/cassandra/pull/1166]|[j8|https://app.circleci.com/pipelines/github/adelapena/cassandra/1269/workflows/ff3d8348-4c95-40b2-ba21-1ca439e72b91]|
|[4.0 |https://github.com/apache/cassandra/pull/1167]|[j8|https://app.circleci.com/pipelines/github/adelapena/cassandra/1270/workflows/a48d355d-cd6b-4d1b-a3da-2be3b5fa6d99] [j11|https://app.circleci.com/pipelines/github/adelapena/cassandra/1270/workflows/16d2a281-823b-4419-b54c-19c22676f855]|
|[trunk|https://github.com/apache/cassandra/pull/1168]|[j8|https://app.circleci.com/pipelines/github/adelapena/cassandra/1268/workflows/aef1c703-c816-40f8-8e07-9055027d6403] [j11|https://app.circleci.com/pipelines/github/adelapena/cassandra/1268/workflows/b325cc10-87f7-420c-a6a1-2bab576ea601]|
|[dtest|https://github.com/apache/cassandra-dtest/pull/155]|

[~Bereng], [~jlewandowski] please let me know if this looks good to you.

> 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
>          Components: Legacy/Local Write-Read Paths
>            Reporter: Andres de la Peña
>            Assignee: Andres de la Peña
>            Priority: Normal
>             Fix For: 3.0.x, 3.11.x, 4.0.x, 4.x
>
>          Time Spent: 2.5h
>  Remaining Estimate: 0h
>
> 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.20.1#820001)

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