[ 
https://issues.apache.org/jira/browse/CASSANDRA-734?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-734:
-------------------------------------

    Attachment: 734-nbhm.txt

that's why you have to do the second check once you synchronize.  it's a 
double-checked locking variant, using NBHM to provide thread safety on the 
initial get() [like you would with volatile, in standard non-broken DCL]

patch attached since i'm clearly not explaining this very well :)

> 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: 734-nbhm.txt, 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