cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r822878 - /incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
Date Wed, 07 Oct 2009 19:49:00 GMT
Author: jbellis
Date: Wed Oct  7 19:48:59 2009
New Revision: 822878

URL: http://svn.apache.org/viewvc?rev=822878&view=rev
Log:
create new collection when reducing the number of sstables compacted; the lists returned by
subList are unmodifiable
patch by jbellis; reviewed by goffinet for CASSANDRA-473

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

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java?rev=822878&r1=822877&r2=822878&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java Wed
Oct  7 19:48:59 2009
@@ -834,8 +834,9 @@
         if (compactionFileLocation == null)
         {
             SSTableReader maxFile = getMaxSizeFile(sstables);
-            sstables.remove(maxFile);
-            return doFileCompaction(sstables);
+            List<SSTableReader> smallerSSTables = new ArrayList<SSTableReader>(sstables);
+            smallerSSTables.remove(maxFile);
+            return doFileCompaction(smallerSSTables);
         }
 
         long startTime = System.currentTimeMillis();



Mime
View raw message