cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From goffi...@apache.org
Subject svn commit: r1099920 - /cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/io/CompactionIterator.java
Date Thu, 05 May 2011 19:06:38 GMT
Author: goffinet
Date: Thu May  5 19:06:38 2011
New Revision: 1099920

URL: http://svn.apache.org/viewvc?rev=1099920&view=rev
Log:
Disable compaction throttling during bootstrap
patch by goffinet; reviewed by driftx for CASSANDRA-2612

Modified:
    cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/io/CompactionIterator.java

Modified: cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/io/CompactionIterator.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/io/CompactionIterator.java?rev=1099920&r1=1099919&r2=1099920&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/io/CompactionIterator.java
(original)
+++ cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/io/CompactionIterator.java
Thu May  5 19:06:38 2011
@@ -27,6 +27,7 @@ import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
+import org.apache.cassandra.service.StorageService;
 import org.apache.commons.collections.iterators.CollatingIterator;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -169,7 +170,7 @@ implements Closeable, CompactionInfo.Hol
 
     private void throttle()
     {
-        if (DatabaseDescriptor.getCompactionThroughputMbPerSec() < 1)
+        if (DatabaseDescriptor.getCompactionThroughputMbPerSec() < 1 || StorageService.instance.isBootstrapMode())
             // throttling disabled
             return;
         int totalBytesPerMS = DatabaseDescriptor.getCompactionThroughputMbPerSec() * 1024
* 1024 / 1000;



Mime
View raw message