mirror of https://github.com/apache/cassandra
Merge branch 'cassandra-2.0' into cassandra-2.1
Conflicts: CHANGES.txt
This commit is contained in:
commit
af802014d6
|
|
@ -13,6 +13,7 @@ Merged from 2.0:
|
|||
* return all cpu values from BackgroundActivityMonitor.readAndCompute (CASSANDRA-7183)
|
||||
* reduce garbage creation in calculatePendingRanges (CASSANDRA-7191)
|
||||
* fix c* launch issues on Russian os's due to output of linux 'free' cmd (CASSANDRA-6162)
|
||||
* Fix disabling autocompaction (CASSANDRA-7187)
|
||||
Merged from 1.2:
|
||||
* Add Cloudstack snitch (CASSANDRA-7147)
|
||||
* Update system.peers correctly when relocating tokens (CASSANDRA-7126)
|
||||
|
|
|
|||
|
|
@ -87,13 +87,8 @@ public abstract class AbstractCompactionStrategy
|
|||
tombstoneThreshold = optionValue == null ? DEFAULT_TOMBSTONE_THRESHOLD : Float.parseFloat(optionValue);
|
||||
optionValue = options.get(TOMBSTONE_COMPACTION_INTERVAL_OPTION);
|
||||
tombstoneCompactionInterval = optionValue == null ? DEFAULT_TOMBSTONE_COMPACTION_INTERVAL : Long.parseLong(optionValue);
|
||||
optionValue = options.get(COMPACTION_ENABLED);
|
||||
|
||||
if (optionValue != null)
|
||||
{
|
||||
if (optionValue.equalsIgnoreCase("false"))
|
||||
this.enabled = false;
|
||||
}
|
||||
if (!shouldBeEnabled())
|
||||
this.disable();
|
||||
}
|
||||
catch (ConfigurationException e)
|
||||
{
|
||||
|
|
@ -376,4 +371,11 @@ public abstract class AbstractCompactionStrategy
|
|||
uncheckedOptions.remove(COMPACTION_ENABLED);
|
||||
return uncheckedOptions;
|
||||
}
|
||||
|
||||
public boolean shouldBeEnabled()
|
||||
{
|
||||
String optionValue = options.get(COMPACTION_ENABLED);
|
||||
|
||||
return optionValue == null || Boolean.parseBoolean(optionValue);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -305,7 +305,8 @@ public class CassandraDaemon
|
|||
{
|
||||
for (final ColumnFamilyStore store : cfs.concatWithIndexes())
|
||||
{
|
||||
store.enableAutoCompaction();
|
||||
if (store.getCompactionStrategy().shouldBeEnabled())
|
||||
store.enableAutoCompaction();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue