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

Digest mismatch if static column is NULL

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 3.0.9, 3.8
    • Messaging/Internode
    • None
    • Normal

    Description

      If a table has a static column and this column has a null value for a partition a SELECT on this partition will always trigger a digest mismatch, but the following full data read will not trigger a read repair since there is no mismatch in the data.

      This can be recreated using a 3 node ccm cluster with the following commands:

      CREATE KEYSPACE foo WITH replication = {'class': 'NetworkTopologyStrategy', 'dc1': '3' };
      CREATE TABLE foo.foo ( key int, foo int, col int static, PRIMARY KEY (key, foo) );
      CONSISTENCY QUORUM;
      INSERT INTO foo.foo (key, foo) VALUES ( 1,1);
      TRACING ON;
      SELECT * FROM foo.foo WHERE key = 1 and foo =1;
      

      I have added the trace in an attachment. In the trace you can see that digest read is performed and that there is a digest mismatch, but the full data read does not result in a mismatch. Repeating the SELECT statement will give the same trace over and over.
      The problem seams to be that the name of the static column is included when the digest response is calculated even if the column has no value. When the digest for the data response is calculated the column name is not included.
      I think the can be solved by updating UnfilteredRowIterators.digest() so excludes the static column if it has no value. I have a patch that does this, it merges to both 3.0 and trunk.

      Attachments

        1. 12090.txt
          1 kB
          Tommy Stendahl
        2. trace.txt
          16 kB
          Tommy Stendahl

        Activity

          People

            tommy_s Tommy Stendahl
            tommy_s Tommy Stendahl
            Tommy Stendahl
            Sylvain Lebresne
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: