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

Stu Hood commented on CASSANDRA-1954:
-------------------------------------

We're really not gaining all of the benefit of a RRW lock if N threads are 
going to acquire it in write mode, but suit yourself.

> Double-check or replace RRW memtable lock
> -----------------------------------------
>
>                 Key: CASSANDRA-1954
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1954
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Stu Hood
>            Priority: Minor
>
> {quote}...when a Memtable reaches its threshold, up to (all) N write threads 
> will often notice, and race to acquire the writeLock in order to freeze the 
> memtable. This means that we do way more writeLock acquisitions than we need 
> to...{quote}
> See CASSANDRA-1930 for backstory, but adding double checking inside a read 
> lock before trying to re-entrantly acquire the writelock would eliminate most 
> of these excess writelock acquisitions.
> Alternatively, we should explore removing locking from these structures 
> entirely, and replacing the writeLock acquisition with a per-memtable counter 
> of active threads.

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