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

MerkleTree mismatch when a cell is shadowed by a range tombstone in different SSTables

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Duplicate
    • None
    • None
    • Normal

    Description

      Below is a script which allows to reproduce the problem:

      ccm create test -v 2.1.13 -n 2 -s
      ccm node1 cqlsh
      CREATE KEYSPACE test_rt WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 2};
      USE test_rt;
      CREATE TABLE IF NOT EXISTS table1 (
          c1 text,
          c2 text,
          c3 text,
          PRIMARY KEY ((c1), c2)
      );
      INSERT INTO table1 (c1, c2, c3) VALUES ( 'a', 'b', 'c');
      ctrl ^d
      # now flush only one of the two nodes
      ccm node1 flush 
      ccm node1 cqlsh
      USE test_rt;
      DELETE FROM table1 WHERE c1 = 'a' AND c2 = 'b';
      ctrl ^d
      ccm node1 repair test_rt table1
      # now grep the log and observe that there was some inconstencies detected between nodes (while it shouldn't have detected any)
      ccm node1 showlog | grep "out of sync"
      

      The wrong hash will be computed on node1, which will include the previously deleted cell, thus resulting in a MT mismatch.

      This is due to the fact that, in LazilyCompactedRow, the RT is not added into the RT tracker (in fact, it's added only if it is GCable, but should always be added).

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            frousseau Fabien Rousseau Assign to me
            frousseau Fabien Rousseau
            Fabien Rousseau
            Branimir Lambov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment