You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jonathan Ellis (Created) (JIRA)" <ji...@apache.org> on 2012/02/15 18:28:59 UTC

[jira] [Created] (CASSANDRA-3919) Dropping a column should do more than just remove the definition

Dropping a column should do more than just remove the definition
----------------------------------------------------------------

                 Key: CASSANDRA-3919
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3919
             Project: Cassandra
          Issue Type: Sub-task
          Components: Core
            Reporter: Jonathan Ellis
            Assignee: Sylvain Lebresne
             Fix For: 1.1.1


Dropping a column should:

- immediately make it unavailable for {{SELECT}}, including {{SELECT *}}
- eventually (i.e., post-compaction) reclaim the space formerly used by that column


--
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-3919) Dropping a column should do more than just remove the definition

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

Jonathan Ellis commented on CASSANDRA-3919:
-------------------------------------------

This is conceptually simple. At a high level this just involves
- adding a dropped_columns Set to CFMetadata
- wiring that in to AlterTableStatement
- updating AbstractCompactedRow implementations to leave them out of merged rows

We don't even have to update the IColumnIterator implementations to ignore dropped columns, since CQL3 SelectStatement already rejects non-existing column names in prepare().

The one wrinkle I can think of is that dropping columns should not be allowed with COMPACT STORAGE. Should be easy to check for that in the CFMetadata, though (i.e., empty column_aliases).
                
> Dropping a column should do more than just remove the definition
> ----------------------------------------------------------------
>
>                 Key: CASSANDRA-3919
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3919
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: Core
>            Reporter: Jonathan Ellis
>            Assignee: Sylvain Lebresne
>              Labels: compaction, cql
>             Fix For: 1.1.1
>
>
> Dropping a column should:
> - immediately make it unavailable for {{SELECT}}, including {{SELECT *}}
> - eventually (i.e., post-compaction) reclaim the space formerly used by that column

--
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-3919) Dropping a column should do more than just remove the definition

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

Sylvain Lebresne commented on CASSANDRA-3919:
---------------------------------------------

Actually I think there is a small problem, which is 'what if someone drop a column, then add it back later'? I guess there is a few options there:
# don't allow to add back a dropped column ever
# have a way to know when the column have been fully purged from the data, and only allow to re-add the column then (but we'd have to check that *all* node have purged it first).
# assume that the column timestamp is a real timestamp. Then in the dropped_columns set we could keep the timestamp of when the column was drop, and if it is added back, during read we would return the column only if the timestamp > dropped_timestamp.

My preference goes to 3 as this feels actually easier to get right than 2 and is much less limiting than 1. Note that even with 3, we could still add a way to know when the column has been fully purged so that we remove it to the dropped_colums set (but that can be left to a following ticket as it would really just be an optimisation).
                
> Dropping a column should do more than just remove the definition
> ----------------------------------------------------------------
>
>                 Key: CASSANDRA-3919
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3919
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: Core
>            Reporter: Jonathan Ellis
>            Assignee: Sylvain Lebresne
>              Labels: compaction, cql
>             Fix For: 1.1.1
>
>
> Dropping a column should:
> - immediately make it unavailable for {{SELECT}}, including {{SELECT *}}
> - eventually (i.e., post-compaction) reclaim the space formerly used by that column

--
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-3919) Dropping a column should do more than just remove the definition

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

Jonathan Ellis commented on CASSANDRA-3919:
-------------------------------------------

3 feels reasonable to me.
                
> Dropping a column should do more than just remove the definition
> ----------------------------------------------------------------
>
>                 Key: CASSANDRA-3919
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3919
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: Core
>            Reporter: Jonathan Ellis
>            Assignee: Sylvain Lebresne
>              Labels: compaction, cql
>             Fix For: 1.1.1
>
>
> Dropping a column should:
> - immediately make it unavailable for {{SELECT}}, including {{SELECT *}}
> - eventually (i.e., post-compaction) reclaim the space formerly used by that column

--
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-3919) Dropping a column should do more than just remove the definition

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

Jonathan Ellis updated CASSANDRA-3919:
--------------------------------------

    Fix Version/s:     (was: 1.1.2)
                   1.2
    
> Dropping a column should do more than just remove the definition
> ----------------------------------------------------------------
>
>                 Key: CASSANDRA-3919
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3919
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: Core
>            Reporter: Jonathan Ellis
>            Assignee: Sylvain Lebresne
>              Labels: compaction, cql
>             Fix For: 1.2
>
>
> Dropping a column should:
> - immediately make it unavailable for {{SELECT}}, including {{SELECT *}}
> - eventually (i.e., post-compaction) reclaim the space formerly used by that column

--
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-3919) Dropping a column should do more than just remove the definition

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

Sylvain Lebresne updated CASSANDRA-3919:
----------------------------------------

    Fix Version/s:     (was: 1.3)
                   1.2.1
    
> Dropping a column should do more than just remove the definition
> ----------------------------------------------------------------
>
>                 Key: CASSANDRA-3919
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3919
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: Core
>            Reporter: Jonathan Ellis
>            Assignee: Sylvain Lebresne
>              Labels: compaction, cql
>             Fix For: 1.2.1
>
>
> Dropping a column should:
> - immediately make it unavailable for {{SELECT}}, including {{SELECT *}}
> - eventually (i.e., post-compaction) reclaim the space formerly used by that column

--
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