cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r1127636 - in /cassandra/branches/cassandra-0.8.0: CHANGES.txt src/java/org/apache/cassandra/db/DataTracker.java
Date Wed, 25 May 2011 19:09:38 GMT
Author: jbellis
Date: Wed May 25 19:09:38 2011
New Revision: 1127636

URL: http://svn.apache.org/viewvc?rev=1127636&view=rev
Log:
fix potential stack overflow during compaction
patch by Shotaro Kamio and jbellis; reviewed by mdennis for CASSANDRA-2626

Modified:
    cassandra/branches/cassandra-0.8.0/CHANGES.txt
    cassandra/branches/cassandra-0.8.0/src/java/org/apache/cassandra/db/DataTracker.java

Modified: cassandra/branches/cassandra-0.8.0/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8.0/CHANGES.txt?rev=1127636&r1=1127635&r2=1127636&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8.0/CHANGES.txt (original)
+++ cassandra/branches/cassandra-0.8.0/CHANGES.txt Wed May 25 19:09:38 2011
@@ -10,6 +10,7 @@
    SimpleStrategy, OldNetworkTopologyStrategy (CASSANDRA-2678)
  * fix exception adding validators to non-string columns (CASSANDRA-2696)
  * avoid instantiating DatabaseDescriptor in JDBC (CASSANDRA-2694)
+ * fix potential stack overflow during compaction (CASSANDRA-2626)
 
 
 0.8.0-rc1

Modified: cassandra/branches/cassandra-0.8.0/src/java/org/apache/cassandra/db/DataTracker.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8.0/src/java/org/apache/cassandra/db/DataTracker.java?rev=1127636&r1=1127635&r2=1127636&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8.0/src/java/org/apache/cassandra/db/DataTracker.java (original)
+++ cassandra/branches/cassandra-0.8.0/src/java/org/apache/cassandra/db/DataTracker.java Wed
May 25 19:09:38 2011
@@ -29,6 +29,7 @@ import java.util.concurrent.atomic.Atomi
 import java.util.concurrent.atomic.AtomicReference;
 
 import com.google.common.collect.Iterables;
+import org.apache.commons.collections.set.UnmodifiableSet;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -453,9 +454,9 @@ public class DataTracker
         public View(Memtable memtable, Set<Memtable> pendingFlush, Set<SSTableReader>
sstables, Set<SSTableReader> compacting)
         {
             this.memtable = memtable;
-            this.memtablesPendingFlush = Collections.unmodifiableSet(pendingFlush);
-            this.sstables = Collections.unmodifiableSet(sstables);
-            this.compacting = Collections.unmodifiableSet(compacting);
+            this.memtablesPendingFlush = pendingFlush instanceof UnmodifiableSet ? pendingFlush
: Collections.unmodifiableSet(pendingFlush);
+            this.sstables = sstables instanceof UnmodifiableSet ? sstables : Collections.unmodifiableSet(sstables);
+            this.compacting = compacting instanceof UnmodifiableSet ? compacting : Collections.unmodifiableSet(compacting);
         }
 
         public View switchMemtable(Memtable newMemtable)



Mime
View raw message