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



##########
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:
       I see. Those queries wouldn't immediately increase the counter. That 
counter would be increased later, during the batchlog replay phase of the node 
restart that comes after those lines. The problem is that the batchlog replay 
of the default schema includes a bunch unrelated schema mutations, and we don't 
have an easy way to identify our mutations of interest. Besides, I don't think 
that Python dtests have the tooling to easily introduce that counter. 
   
   What we can do instead is simply emit a log message when applying the rule, 
and then make the test look into the logs to verify that the injected delay is 
being applied, [this 
way](https://github.com/adelapena/cassandra-dtest/commit/635a5ef4686a5e2b1d761b648e530b7907bc099a).
 This would allow us to quickly detect in the future that we need to update the 
rule.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to