bbotella commented on code in PR #3562:
URL: https://github.com/apache/cassandra/pull/3562#discussion_r1932341523


##########
src/java/org/apache/cassandra/cql3/statements/schema/AlterTableStatement.java:
##########
@@ -582,6 +582,9 @@ public void validate(ClientState state)
         public KeyspaceMetadata apply(Epoch epoch, KeyspaceMetadata keyspace, 
TableMetadata table, ClusterMetadata metadata)
         {
             attrs.validate();
+            if (attrs.getBoolean(TableParams.Option.CDC.toString(), false) && 
table.hasConstraints)
+                throw new InvalidRequestException("CDC and Constraints should 
not be enabled at the same time as" +
+                                                  " it could cause issues with 
node bootstraping");

Review Comment:
   After syncing with @jmckenzie-dev, he pointed out that the way streaming 
works with CDC: it’ll take the base data from one node, send it over to the 
other node, and instead of just dropping it in a dir and updating the View 
internally w/the new sstable, it’ll take that data and push it through the 
write path
   
   Meaning data at rest from node A, copied to node B, node B then pushes that 
data through the write path to either a) get things into the commit log for 
CDC, or b) have the code required for MV’s run to build the mv locally.
   
   That means that, if there were pre-existing offending data on the source 
node, it won't be able to be written to the destination node. To prevent that 
from happening, we are disabling CDC + constraints for now. My idea is to 
revisit this in the future when we come up with a plan to address that.



-- 
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