Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AF15DC2E9 for ; Fri, 25 May 2012 20:52:55 +0000 (UTC) Received: (qmail 35874 invoked by uid 500); 25 May 2012 20:52:54 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 35805 invoked by uid 500); 25 May 2012 20:52:54 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 35613 invoked by uid 99); 25 May 2012 20:52:54 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 May 2012 20:52:54 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 6DECE17FEC; Fri, 25 May 2012 20:52:54 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jbellis@apache.org To: commits@cassandra.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [5/11] git commit: kick off background compaction when min/max thresholds change patch by jbellis; reviewed by slebresne for CASSANDRA-4279 Message-Id: <20120525205254.6DECE17FEC@tyr.zones.apache.org> Date: Fri, 25 May 2012 20:52:54 +0000 (UTC) kick off background compaction when min/max thresholds change patch by jbellis; reviewed by slebresne for CASSANDRA-4279 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/1bfb6851 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/1bfb6851 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/1bfb6851 Branch: refs/heads/cassandra-1.1 Commit: 1bfb68518a20abdfd7fd1c3e3422df9214df6b05 Parents: 0f439b0 Author: Jonathan Ellis Authored: Fri May 25 15:49:49 2012 -0500 Committer: Jonathan Ellis Committed: Fri May 25 15:50:48 2012 -0500 ---------------------------------------------------------------------- CHANGES.txt | 2 ++ .../org/apache/cassandra/db/ColumnFamilyStore.java | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/1bfb6851/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 3abd9fc..2700661 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -73,6 +73,8 @@ Merged from 1.0: (CASSANDRA-3985) * 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.1.0-final http://git-wip-us.apache.org/repos/asf/cassandra/blob/1bfb6851/src/java/org/apache/cassandra/db/ColumnFamilyStore.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java index c55d924..4a49d10 100644 --- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java +++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java @@ -1824,10 +1824,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() @@ -1838,10 +1838,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()