[ 
https://issues.apache.org/jira/browse/CASSANDRA-840?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12842847#action_12842847
 ] 

Gary Dusbabek commented on CASSANDRA-840:
-----------------------------------------

>It's safe for other threads to be messing about with existing Table references 
>during a mutate right?
No. It's very unsafe.  ThreadA calls Table.open(A), ThreadB drops a CF in A, 
ThreadA then tries to mutate rows on that CF.  At some point ThreadB will cause 
that table to release() and its column families go away.  I'm not sure what the 
right behavior is in this case (loud failure IMO).  That table essentially 
becomes invalid and will be replaced in Table.instances with a new version.

Is that a bad approach?  Possibly.  I was hoping to avoid having to discover 
all the states in CFS that I would have to account for when a CF def is 
mutated.  CFS wasn't designed from that standpoint and I think getting it there 
would be an onerous task.

I think a fair compromise would be to mark Table instances invalid when they 
are released and have them throw an exception in apply() to indicate the 
reference has been invalidated and can no longer be operated on (I'm thinking 
in the context of renames, which are the most complicated, but this approach 
makes the most sense in the context of deletes).

> Add the ability to add/remove/rename column families on a single node.
> ----------------------------------------------------------------------
>
>                 Key: CASSANDRA-840
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-840
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: Core
>            Reporter: Gary Dusbabek
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.7
>
>         Attachments: v1-0001-store-cfid-map-in-CLH.txt, 
> v1-0002-establish-ordering-of-cfids.txt, 
> v1-0003-add-a-cf-on-a-single-node.txt, 
> v1-0004-drop-a-cf-on-a-single-node.txt, 
> v1-0005-rename-a-cf-on-a-single-node.txt, 
> v1-0006-alternate-locking-approach.txt
>
>
> We need the ability to manipulate the KS/CF definitions structures in 
> DatabaseDescriptor.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to