Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-19948

Changing cdc table property can cause schema disagreement

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Normal
    • Resolution: Unresolved
    • 4.1.x, 5.0.x, 5.x
    • Cluster/Schema
    • None
    • Degradation - Other Exception
    • Normal
    • Normal
    • User Report
    • All
    • None
    • Show
      https://github.com/apache/cassandra/pull/3576

    Description

      In the cassandra.yaml file, there is a parameter named "cdc_enabled" which allows CDC to be enabled or disabled on each individual nodes.

      It has been found that it can cause schema disagreement or discrepancy when an "ALTER TABLE ... WITH cdc=..." statement is ran against a node which has "cdc_enabled" set to "false" in a cluster in which nodes have mixed "true"/"false" values for the "cdc_enabled" settings.

      The exact behaviour of the above is version-dependant.

      On Cassandra 4.1.1, the cluster will end up in the schema disagreement state. A rolling restart will bring the schema back in sync, but the changes made to the `cdc` table property will be lost. 

      On Cassandra 4.1.6, the cluster will not have visible schema disagreement in the "nodetool describecluster" command's output, but the "ALTER TABLE" statement only has cosmetic effect on the node it is run. The node with "cdc_enabled" set to "false" will show the "cdc" table property has changed, but this does not affect its behaviour in any way. At the same time, other nodes do not see that table property change at all. This is perhaps even worse than on 4.1.1, because the alter table statement is silently failing. 

      On Casandra 5.0.0, the behaviour is the same as 4.1.6.

      A shell script for reproducing the above described behaviours in Docker, and the outputs of it on both 4.1.1 and 4.1.6 and 5.0.0 are attached.

       

      Edit on 25 Sep: added test result on 5.0.0

      Attachments

        1. cdc_schema_disagreement.sh
          2 kB
          Bowen Song
        2. 4.1.1.txt
          1 kB
          Bowen Song
        3. 4.1.6.txt
          0.9 kB
          Bowen Song
        4. 5.0.0-corrected.txt
          0.9 kB
          Bowen Song

        Activity

          People

            Unassigned Unassigned
            Bowen Song Bowen Song
            Bernardo Botella Corbi
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 10m
                10m