cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r942229 - /cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
Date Fri, 07 May 2010 21:11:41 GMT
Author: jbellis
Date: Fri May  7 21:11:40 2010
New Revision: 942229

URL: http://svn.apache.org/viewvc?rev=942229&view=rev
Log:
call getMemtableThreadSafe instead of copying it.  patch by jbellis

Modified:
    cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java

Modified: cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java?rev=942229&r1=942228&r2=942229&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java Fri May  7 21:11:40
2010
@@ -778,15 +778,7 @@ public class ColumnFamilyStore implement
             IColumnIterator iter;
 
             /* add the current memtable */
-            Table.flusherLock.readLock().lock();
-            try
-            {
-                iter = filter.getMemtableColumnIterator(memtable_, getComparator());
-            }
-            finally
-            {
-                Table.flusherLock.readLock().unlock();
-            }
+            iter = filter.getMemtableColumnIterator(getMemtableThreadSafe(), getComparator());
             if (iter != null)
             {
                 returnCF.delete(iter.getColumnFamily());
@@ -794,7 +786,7 @@ public class ColumnFamilyStore implement
             }
 
             /* add the memtables being flushed */
-            for (Memtable memtable : getMemtablesPendingFlush())
+            for (Memtable memtable : memtablesPendingFlush)
             {
                 iter = filter.getMemtableColumnIterator(memtable, getComparator());
                 if (iter != null)



Mime
View raw message