Return-Path: Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: (qmail 16636 invoked from network); 21 Feb 2011 12:12:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Feb 2011 12:12:06 -0000 Received: (qmail 5296 invoked by uid 500); 21 Feb 2011 12:12:06 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 4987 invoked by uid 500); 21 Feb 2011 12:12:03 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 4972 invoked by uid 99); 21 Feb 2011 12:12:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Feb 2011 12:12:01 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Feb 2011 12:11:59 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 736ED1AF2EE for ; Mon, 21 Feb 2011 12:11:38 +0000 (UTC) Date: Mon, 21 Feb 2011 12:11:38 +0000 (UTC) From: "Sylvain Lebresne (JIRA)" To: commits@cassandra.apache.org Message-ID: <1291040486.5650.1298290298469.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <5613170.226211294457745232.JavaMail.jira@thor> Subject: [jira] Commented: (CASSANDRA-1954) Double-check or replace RRW memtable lock MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CASSANDRA-1954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997369#comment-12997369 ] Sylvain Lebresne commented on CASSANDRA-1954: --------------------------------------------- I agree with the change of frozen to pendingFlush, as well as that this should probably go to trunk (given it's in a fairly critical path). > 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 > Attachments: 0001-Double-check-in-maybeSwitchMemtable-to-minimize-writeL.txt, 0001-Remove-flusherLock-readLock.patch, 1954-v2.txt > > > {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. - For more information on JIRA, see: http://www.atlassian.com/software/jira