bereng commented on a change in pull request #1168:
URL: https://github.com/apache/cassandra/pull/1168#discussion_r788778509
##########
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'm pointing at in between each of these:
```
session.execute("INSERT INTO ks.t (k, a, b) VALUES(2, 20, 100)")
session.execute("ALTER TABLE ks.t ADD c int")
session.execute("INSERT INTO ks.t (k, a, b, c) VALUES(3, 30, 300,
3000)")
session.execute("ALTER TABLE ks.t DROP b")
session.execute("INSERT INTO ks.t (k, a, c) VALUES(4, 40, 4000)")
```
Checking the counter increased would guarantee schemas mutations are
_indeed_ detected and the 'wait' happens. Does it make more sense now? I'm not
feeling strongly about it but it's sthg that crossed my mind.
--
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]