mirror of https://github.com/apache/cassandra
kick off background compaction when min/max thresholds change
patch by jbellis; reviewed by slebresne for CASSANDRA-4279
This commit is contained in:
parent
f89b9aecc6
commit
00a5534386
|
|
@ -1,6 +1,8 @@
|
|||
1.0.11
|
||||
* synchronize LCS getEstimatedTasks to avoid CME (CASSANDRA-4255)
|
||||
* ensure unique streaming session id's (CASSANDRA-4223)
|
||||
* kick off background compaction when min/max thresholds change
|
||||
(CASSANDRA-4279)
|
||||
|
||||
|
||||
1.0.10
|
||||
|
|
|
|||
|
|
@ -1727,10 +1727,10 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean
|
|||
public void setMinimumCompactionThreshold(int minCompactionThreshold)
|
||||
{
|
||||
if ((minCompactionThreshold > this.maxCompactionThreshold.value()) && this.maxCompactionThreshold.value() != 0)
|
||||
{
|
||||
throw new RuntimeException("The min_compaction_threshold cannot be larger than the max.");
|
||||
}
|
||||
|
||||
this.minCompactionThreshold.set(minCompactionThreshold);
|
||||
CompactionManager.instance.submitBackground(this);
|
||||
}
|
||||
|
||||
public int getMaximumCompactionThreshold()
|
||||
|
|
@ -1741,10 +1741,10 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean
|
|||
public void setMaximumCompactionThreshold(int maxCompactionThreshold)
|
||||
{
|
||||
if (maxCompactionThreshold > 0 && maxCompactionThreshold < this.minCompactionThreshold.value())
|
||||
{
|
||||
throw new RuntimeException("The max_compaction_threshold cannot be smaller than the min.");
|
||||
}
|
||||
|
||||
this.maxCompactionThreshold.set(maxCompactionThreshold);
|
||||
CompactionManager.instance.submitBackground(this);
|
||||
}
|
||||
|
||||
public boolean isCompactionDisabled()
|
||||
|
|
|
|||
Loading…
Reference in New Issue