[
https://issues.apache.org/jira/browse/CASSANDRA-734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12804281#action_12804281
]
Jonathan Ellis edited comment on CASSANDRA-734 at 1/24/10 7:21 PM:
-------------------------------------------------------------------
> synchronization being slow is mostly a scary story left around from the bad
> old days of Java 1.3 and lower
That's true for _uncontested_ syncs but that is not what we have here. The JVM
isn't going to be able to optimize those away, and it's going to be several
orders of magnitude slower than w/o the sync.
> any thing we build instead of using synchronized will be nearly exactly
> duplicating synchronized's behavior except broken and slower
NBHM is lock-free (which actually means it uses lower-level CAS which is much
cheaper).
> we should be aiming as much for correctness as we can
I never said otherwise. But let's do it without causing unnecessary
performance regressions.
was (Author: jbellis):
> synchronization being slow is mostly a scary story left around from the
bad old days of Java 1.3 and lower
That's true for _uncontested_ syncs but that is not what we have here. The JVM
isn't going to be able to optimize those away, and it's going to be several
orders of magnitude slower than w/o the sync.
> any thing we build instead of using synchronized will be nearly exactly
> duplicating synchronized's behavior except broken and slower
NBHM is lock-free (which actually means it uses lower-level CAS which is much
cheaper).
> we should be aiming as much for correctness as we can
I never said otherwise.
> synchronized does a bang up job of fixing this bug now and doing so in a way
> that is more performant than other "correct" ways
wrong, see above.
> 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.