[
https://issues.apache.org/jira/browse/CASSANDRA-734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12804340#action_12804340
]
Jonathan Ellis edited comment on CASSANDRA-734 at 1/25/10 1:16 AM:
-------------------------------------------------------------------
> How does a NBHM solve the problem
> get-and-then-put-but-only-instantiate-the-object-at-all-if-get-is-null?
It doesn't: it solves the problem of doing get() on a thread-unsafe object
while remaining high performance. I'm saying, we can use Table.open in close
to its current form by replacing the current HashMap w/ a NBHM, and continuing
to use a synchronized block for if the get() is null.
> Not if we do the initTable work, and then later turn it in a NBHM.
True enough, but is that then really simpler than just fixing Table.open?
was (Author: jbellis):
> How does a NBHM solve the problem
get-and-then-put-but-only-instantiate-the-object-at-all-if-get-is-null?
It doesn't: it solves the problem of doing get() on a thread-unsafe object
while remaining high performance. I'm saying, we can use Table.open in close
to its current form by replacing the current HashMap w/ a NBHM.
> Not if we do the initTable work, and then later turn it in a NBHM.
True enough, but is that then really simpler than just fixing Table.open?
> 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.