You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2022/01/18 10:57:14 UTC

[GitHub] [cassandra] bereng commented on a change in pull request #1168: CASSANDRA-16878 trunk: Race in commit log replay can cause rejected mutations

bereng commented on a change in pull request #1168:
URL: https://github.com/apache/cassandra/pull/1168#discussion_r786635601



##########
File path: src/java/org/apache/cassandra/db/commitlog/CommitLogReplayer.java
##########
@@ -436,16 +455,23 @@ public void handleMutation(Mutation m, int size, int entryLocation, CommitLogDes
             sawCDCMutation = true;
 
         pendingMutationBytes += size;
+
+        boolean isSchemaMutation = SchemaConstants.isSchemaKeyspace(m.getKeyspaceName());
+
+        if (isSchemaMutation)
+            writeOrder.awaitNewBarrier();

Review comment:
       Would we want to put this one on a separate method, then on the dtest have a byteman counter and check that on the test?
   
   Now there's just a delay which seems pretty nondeterministic. Counting how many schema changes we issue vs counter should be more deterministic imo.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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