Fix SSTableLoader

patch by thobbs; reviewed by slebresne for CASSANDRA-6205
This commit is contained in:
Sylvain Lebresne 2013-10-22 17:42:50 +02:00
parent 66fe5bdaaa
commit 7159ec1004
2 changed files with 5 additions and 6 deletions

View File

@ -26,6 +26,7 @@
* CQL3: support pre-epoch longs for TimestampType (CASSANDRA-6212)
* Add reloadtriggers command to nodetool (CASSANDRA-4949)
* cqlsh: ignore empty 'value alias' in DESCRIBE (CASSANDRA-6139)
* Fix sstable loader (CASSANDRA-6205)
Merged from 1.2:
* (Hadoop) Require CFRR batchSize to be at least 2 (CASSANDRA-6114)
* Add a warning for small LCS sstable size (CASSANDRA-6191)

View File

@ -36,10 +36,7 @@ import org.slf4j.LoggerFactory;
import org.apache.cassandra.cache.InstrumentingCache;
import org.apache.cassandra.cache.KeyCacheKey;
import org.apache.cassandra.concurrent.DebuggableThreadPoolExecutor;
import org.apache.cassandra.config.CFMetaData;
import org.apache.cassandra.config.ColumnDefinition;
import org.apache.cassandra.config.DatabaseDescriptor;
import org.apache.cassandra.config.Schema;
import org.apache.cassandra.config.*;
import org.apache.cassandra.db.*;
import org.apache.cassandra.db.columniterator.OnDiskAtomIterator;
import org.apache.cassandra.db.commitlog.ReplayPosition;
@ -327,8 +324,9 @@ public class SSTableReader extends SSTable implements Closeable
deletingTask = new SSTableDeletingTask(this);
// Don't track read rates for tables in the system keyspace
if (Keyspace.SYSTEM_KS.equals(desc.ksname))
// Don't track read rates for tables in the system keyspace and don't bother trying to load or persist
// the read meter when in client mode
if (Keyspace.SYSTEM_KS.equals(desc.ksname) || Config.isClientMode())
{
readMeter = null;
return;