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

Adding a dynamic column to a compact storage table with the same name as the partition key causes a memtable flush deadlock

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Low
    • Resolution: Fixed
    • Fix Version/s: 3.0.0
    • Component/s: None
    • Labels:
      None
    • Severity:
      Low

      Description

      The reproduction steps for this are as follows:

      1. Create the following schema:
        CREATE KEYSPACE ks WITH replication = { 'class': 'SimpleStrategy', 'replication_factor': '1'};
        CREATE TABLE ks.cf (k int, v int, PRIMARY KEY(k)) WITH COMPACT STORAGE;
        
      2. Using the thrift client execute the following:
                Column column = new Column(ByteBufferUtil.bytes("k"));
                column.setValue(ByteBufferUtil.bytes(1));
                column.setTimestamp(1);
                client.insert(key, new ColumnParent(compactCf), column, ConsistencyLevel.ONE);
        

      This causes an invalid PartitionUpdate to be added to Memtable containing a PartitionColumns containing the partition key ColumnDefinition.

      This happens because LegacyLayout.decodeCellName does not check whether the ColumnDefinition is a partition key

        Attachments

        1. 10608.txt
          4 kB
          Mike Adamson

          Issue Links

            Activity

              People

              • Assignee:
                mike_tr_adamson Mike Adamson
                Reporter:
                mike_tr_adamson Mike Adamson
                Authors:
                Mike Adamson
                Reviewers:
                Sylvain Lebresne
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: