Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Fix Version/s: 1.1.2
    • Component/s: None
    • Labels:

      Description

      tested in 1.1 and trunk branch on a single node:

      cqlsh:test> create table testcf_old ( username varchar , id int , name varchar , stuff varchar, primary key(username,id,name)) with compact storage;
      cqlsh:test> insert into testcf_old ( username , id , name , stuff ) values ('abc', 2, 'rst', 'some other bunch of craps');
      cqlsh:test> select * from testcf_old;
      username | id | name | stuff
      ---------------+--------------------------
      abc | 2 | rst | some other bunch of craps
      abc | 4 | xyz | a bunch of craps

      cqlsh:test> delete from testcf_old where username = 'abc' and id =2;
      cqlsh:test> select * from testcf_old;
      username | id | name | stuff
      ---------------+--------------------------
      abc | 2 | rst | some other bunch of craps
      abc | 4 | xyz | a bunch of craps

      same also when not using compact:

      cqlsh:test> create table testcf ( username varchar , id int , name varchar , stuff varchar, primary key(username,id));
      cqlsh:test> select * from testcf;
      username | id | name | stuff
      ------------------------------------+-----------------
      abc | 2 | some other bunch of craps | rst
      abc | 4 | xyz | a bunch of craps

      cqlsh:test> delete from testcf where username = 'abc' and id =2;
      cqlsh:test> select * from testcf;
      username | id | name | stuff
      ------------------------------------+-----------------
      abc | 2 | some other bunch of craps | rst
      abc | 4 | xyz | a bunch of craps

      1. 4193.txt
        2 kB
        Sylvain Lebresne

        Activity

        Hide
        Sylvain Lebresne added a comment -

        So for the compact case, this is a dupe of CASSANDRA-3708, it in fact requires a range tombstone (they could be millions of record having the 'abc' and 2 as first components). The reason for the non-compact case is very similar, this amount internally to remove multiple columns. However in that second we could implement a workaround as we know which columns are defined for the table. However, for this too CASSANDRA-3708 will offer a better fix, as it will be more efficient to have 1 (range) tombstone rather than n where n is the number of columns in the table and less special code once CASSANDRA-3708 is in.

        So what I propose is for now to throw an error on the compact case and support the second one by deleting each column individually. Once CASSANDRA-3708 is in, we'll use it to replace the second part. Patch attached to do that.

        Show
        Sylvain Lebresne added a comment - So for the compact case, this is a dupe of CASSANDRA-3708 , it in fact requires a range tombstone (they could be millions of record having the 'abc' and 2 as first components). The reason for the non-compact case is very similar, this amount internally to remove multiple columns. However in that second we could implement a workaround as we know which columns are defined for the table. However, for this too CASSANDRA-3708 will offer a better fix, as it will be more efficient to have 1 (range) tombstone rather than n where n is the number of columns in the table and less special code once CASSANDRA-3708 is in. So what I propose is for now to throw an error on the compact case and support the second one by deleting each column individually. Once CASSANDRA-3708 is in, we'll use it to replace the second part. Patch attached to do that.
        Hide
        Jonathan Ellis added a comment -

        With CASSANDRA-3708 committed, is this still relevant?

        Show
        Jonathan Ellis added a comment - With CASSANDRA-3708 committed, is this still relevant?
        Hide
        Sylvain Lebresne added a comment -

        It is relevant for the 1.1 branch (for which the patch is targeted) since CASSANDRA-3708 is 1.2 only.

        Show
        Sylvain Lebresne added a comment - It is relevant for the 1.1 branch (for which the patch is targeted) since CASSANDRA-3708 is 1.2 only.
        Hide
        Jonathan Ellis added a comment -

        +1

        nit: comment above "cfDef.isComposite && builder.componentCount() != 0" needs to be updated

        Show
        Jonathan Ellis added a comment - +1 nit: comment above "cfDef.isComposite && builder.componentCount() != 0" needs to be updated
        Hide
        Sylvain Lebresne added a comment -

        Committed (fix comment fixed) to 1.1. Since it's not need for trunk I've merge the commit but with '-s ours'.

        Show
        Sylvain Lebresne added a comment - Committed (fix comment fixed) to 1.1. Since it's not need for trunk I've merge the commit but with '-s ours'.

          People

          • Assignee:
            Sylvain Lebresne
            Reporter:
            Jackson Chung
            Reviewer:
            Jonathan Ellis
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development