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

Gary Dusbabek commented on CASSANDRA-734:
-----------------------------------------

> The only other way to make this work is load all the tables at boot time.
See CassandraDaemon.setup().

Why not this:
1.  Create a synchronized initTables() method that is called from CD, that sets 
an initDone flag and blows up it is ever called again.
2.  Take the locking  and synchronicity out of Table.open() (there really is no 
point as long as the backing collection is unmodifiable), and turn it into a 
purely 'getter'-type method.

> Table.open has a broken lock in it
> ----------------------------------
>
>                 Key: CASSANDRA-734
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-734
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 0.5
>            Reporter: Jeff Hodges
>            Assignee: Jeff Hodges
>            Priority: Minor
>             Fix For: 0.6
>
>         Attachments: broken_lock_in_table_open.patch
>
>
> Table.open's lock is used around the Map#put method call but not the #get. 
> This makes it a source of spurious bugs. The attached patch synchronizes the 
> entire Table.open method and removes the unused createLock static.

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