Uploaded image for project: 'Apache Cassandra'
  1. Apache 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

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 3.0.0
    • None
    • None
    • 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

              mike_tr_adamson Mike Adamson
              mike_tr_adamson Mike Adamson
              Mike Adamson
              Sylvain Lebresne
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: