You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Sylvain Lebresne (JIRA)" <ji...@apache.org> on 2012/08/05 21:23:02 UTC

[jira] [Created] (CASSANDRA-4493) Fix update of CF comparator (including adding new collections)

Sylvain Lebresne created CASSANDRA-4493:
-------------------------------------------

             Summary: Fix update of CF comparator (including adding new collections)
                 Key: CASSANDRA-4493
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4493
             Project: Cassandra
          Issue Type: Bug
          Components: Core
            Reporter: Sylvain Lebresne
            Assignee: Sylvain Lebresne
             Fix For: 1.2


Updating the comparator of a column family (which is authorized if the new comparator is "compatible" with the old one, and that includes adding a new component to a CompositeType, or adding a new collection to a CQL3 table) doesn't completely work. The problem is that even if we change the comparator in CFMetada, the old comparator will still be aliased by the current memtable. This means updates (that expect the new comparator) will fail until a new memtable is created.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-4493) Fix update of CF comparator (including adding new collections)

Posted by "Sylvain Lebresne (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4493?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sylvain Lebresne updated CASSANDRA-4493:
----------------------------------------

    Attachment: 0002-Fix-ALTER-logic.txt
                0001-Flush-after-CFStore-reload.txt

Attached a fix (first patch) that adds a flush to the reload of CFS (since it's called when the CFMetadata a the cf is modified).

I note that this affect at least 1.1 and maybe some of 1.0 (I don't remember exactly when we started allowing to change the comparator). However, there was little reason to use that feature so far. This change however in 1.2 since adding a new collection actually change the comparator.

I'm also attaching a 2nd patch that fixes a bit of broken logic in ALTER TABLE for collections. This is not directly related expect that I discovered both bug at the same time, and that second one is fairly simple so I figured this might not warrant a specific ticket.
                
> Fix update of CF comparator (including adding new collections)
> --------------------------------------------------------------
>
>                 Key: CASSANDRA-4493
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4493
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>             Fix For: 1.2
>
>         Attachments: 0001-Flush-after-CFStore-reload.txt, 0002-Fix-ALTER-logic.txt
>
>
> Updating the comparator of a column family (which is authorized if the new comparator is "compatible" with the old one, and that includes adding a new component to a CompositeType, or adding a new collection to a CQL3 table) doesn't completely work. The problem is that even if we change the comparator in CFMetada, the old comparator will still be aliased by the current memtable. This means updates (that expect the new comparator) will fail until a new memtable is created.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-4493) Fix update of CF comparator (including adding new collections)

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13450005#comment-13450005 ] 

Jonathan Ellis commented on CASSANDRA-4493:
-------------------------------------------

+1
                
> Fix update of CF comparator (including adding new collections)
> --------------------------------------------------------------
>
>                 Key: CASSANDRA-4493
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4493
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>             Fix For: 1.2.0
>
>         Attachments: 0001-Flush-after-CFStore-reload.txt, 0002-Fix-ALTER-logic.txt
>
>
> Updating the comparator of a column family (which is authorized if the new comparator is "compatible" with the old one, and that includes adding a new component to a CompositeType, or adding a new collection to a CQL3 table) doesn't completely work. The problem is that even if we change the comparator in CFMetada, the old comparator will still be aliased by the current memtable. This means updates (that expect the new comparator) will fail until a new memtable is created.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira