You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ma...@apache.org on 2014/07/03 14:30:49 UTC
[1/3] git commit: Add property to disable stcs in L0
Repository: cassandra
Updated Branches:
refs/heads/cassandra-2.1 047c67efb -> a0bfdebca
Add property to disable stcs in L0
Patch by marcuse; reviewed by tjake for CASSANDRA-6621
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f39cb073
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f39cb073
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f39cb073
Branch: refs/heads/cassandra-2.1
Commit: f39cb073ac0ecd68a3df4b60c43d6b0b8f3e8de6
Parents: 4c95d08
Author: Marcus Eriksson <ma...@apache.org>
Authored: Fri Jun 27 08:56:50 2014 +0200
Committer: Marcus Eriksson <ma...@apache.org>
Committed: Thu Jul 3 14:19:50 2014 +0200
----------------------------------------------------------------------
CHANGES.txt | 1 +
NEWS.txt | 9 +++++++++
.../org/apache/cassandra/config/DatabaseDescriptor.java | 5 +++++
.../org/apache/cassandra/db/compaction/LeveledManifest.java | 3 ++-
4 files changed, 17 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/f39cb073/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 6b93631..94bea7b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -8,6 +8,7 @@
* Fix AssertionError when using empty clustering columns and static columns
(CASSANDRA-7455)
* Add inter_dc_stream_throughput_outbound_megabits_per_sec (CASSANDRA-6596)
+ * Add option to disable STCS in L0 (CASSANDRA-6621)
Merged from 1.2:
http://git-wip-us.apache.org/repos/asf/cassandra/blob/f39cb073/NEWS.txt
----------------------------------------------------------------------
diff --git a/NEWS.txt b/NEWS.txt
index 0fbc20f..ea085ae 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -13,6 +13,15 @@ restore snapshots created with the previous major version using the
'sstableloader' tool. You can upgrade the file format of your snapshots
using the provided 'sstableupgrade' tool.
+2.0.10
+====
+New features
+------------
+ - If you are using Leveled Compaction, you can now disable doing size-tiered
+ compaction in L0 by starting Cassandra with -Dcassandra.disable_stcs_in_l0
+ (see CASSANDRA-6621 for details).
+
+
2.0.9
=====
http://git-wip-us.apache.org/repos/asf/cassandra/blob/f39cb073/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
index badd975..bf0307b 100644
--- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
+++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
@@ -904,6 +904,11 @@ public class DatabaseDescriptor
conf.compaction_throughput_mb_per_sec = value;
}
+ public static boolean getDisableSTCSInL0()
+ {
+ return Boolean.getBoolean("cassandra.disable_stcs_in_l0");
+ }
+
public static int getStreamThroughputOutboundMegabitsPerSec()
{
return conf.stream_throughput_outbound_megabits_per_sec;
http://git-wip-us.apache.org/repos/asf/cassandra/blob/f39cb073/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java b/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
index 1118ddc..70e5cae 100644
--- a/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
+++ b/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
@@ -34,6 +34,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.cassandra.config.CFMetaData;
+import org.apache.cassandra.config.DatabaseDescriptor;
import org.apache.cassandra.config.Schema;
import org.apache.cassandra.db.ColumnFamilyStore;
import org.apache.cassandra.db.RowPosition;
@@ -267,7 +268,7 @@ public class LeveledManifest
if (score > 1.001)
{
// before proceeding with a higher level, let's see if L0 is far enough behind to warrant STCS
- if (generations[0].size() > MAX_COMPACTING_L0)
+ if (!DatabaseDescriptor.getDisableSTCSInL0() && generations[0].size() > MAX_COMPACTING_L0)
{
Iterable<SSTableReader> candidates = cfs.getDataTracker().getUncompactingSSTables(generations[0]);
List<Pair<SSTableReader,Long>> pairs = SizeTieredCompactionStrategy.createSSTableAndLengthPairs(AbstractCompactionStrategy.filterSuspectSSTables(candidates));
[3/3] git commit: Merge branch 'cassandra-2.1.0' into cassandra-2.1
Posted by ma...@apache.org.
Merge branch 'cassandra-2.1.0' into cassandra-2.1
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a0bfdebc
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a0bfdebc
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a0bfdebc
Branch: refs/heads/cassandra-2.1
Commit: a0bfdebcaae6056440961b7d1c6b1efefa911e4f
Parents: 047c67e 8c4ffbe
Author: Marcus Eriksson <ma...@apache.org>
Authored: Thu Jul 3 14:29:45 2014 +0200
Committer: Marcus Eriksson <ma...@apache.org>
Committed: Thu Jul 3 14:29:45 2014 +0200
----------------------------------------------------------------------
CHANGES.txt | 1 +
NEWS.txt | 9 +++++++++
.../org/apache/cassandra/config/DatabaseDescriptor.java | 5 +++++
.../org/apache/cassandra/db/compaction/LeveledManifest.java | 5 ++++-
4 files changed, 19 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/a0bfdebc/CHANGES.txt
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/a0bfdebc/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
----------------------------------------------------------------------
[2/3] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1.0
Posted by ma...@apache.org.
Merge branch 'cassandra-2.0' into cassandra-2.1.0
Conflicts:
CHANGES.txt
NEWS.txt
src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/8c4ffbe6
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/8c4ffbe6
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/8c4ffbe6
Branch: refs/heads/cassandra-2.1
Commit: 8c4ffbe6577f3862ee0123199893097154431448
Parents: ea38ddc f39cb07
Author: Marcus Eriksson <ma...@apache.org>
Authored: Thu Jul 3 14:29:31 2014 +0200
Committer: Marcus Eriksson <ma...@apache.org>
Committed: Thu Jul 3 14:29:31 2014 +0200
----------------------------------------------------------------------
CHANGES.txt | 1 +
NEWS.txt | 9 +++++++++
.../org/apache/cassandra/config/DatabaseDescriptor.java | 5 +++++
.../org/apache/cassandra/db/compaction/LeveledManifest.java | 5 ++++-
4 files changed, 19 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/8c4ffbe6/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 22c4123,94bea7b..75a1786
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -15,37 -7,31 +15,38 @@@ Merged from 2.0
* Make sure high level sstables get compacted (CASSANDRA-7414)
* Fix AssertionError when using empty clustering columns and static columns
(CASSANDRA-7455)
- * Add inter_dc_stream_throughput_outbound_megabits_per_sec (CASSANDRA-6596)
+ * Add option to disable STCS in L0 (CASSANDRA-6621)
-Merged from 1.2:
+ * Upgrade to snappy-java 1.0.5.2 (CASSANDRA-7476)
-2.0.9
- * Fix CC#collectTimeOrderedData() tombstone optimisations (CASSANDRA-7394)
- * Fix assertion error in CL.ANY timeout handling (CASSANDRA-7364)
- * Handle empty CFs in Memtable#maybeUpdateLiveRatio() (CASSANDRA-7401)
+2.1.0-rc2
+ * Fix heap size calculation for CompoundSparseCellName and
+ CompoundSparseCellName.WithCollection (CASSANDRA-7421)
+ * Allow counter mutations in UNLOGGED batches (CASSANDRA-7351)
+ * Modify reconcile logic to always pick a tombstone over a counter cell
+ (CASSANDRA-7346)
+ * Avoid incremental compaction on Windows (CASSANDRA-7365)
+ * Fix exception when querying a composite-keyed table with a collection index
+ (CASSANDRA-7372)
+ * Use node's host id in place of counter ids (CASSANDRA-7366)
* Fix native protocol CAS batches (CASSANDRA-7337)
+ * Reduce likelihood of contention on local paxos locking (CASSANDRA-7359)
+ * Upgrade to Pig 0.12.1 (CASSANDRA-6556)
+ * Make sure we clear out repair sessions from netstats (CASSANDRA-7329)
+ * Don't fail streams on failure detector downs (CASSANDRA-3569)
+ * Add optional keyspace to DROP INDEX statement (CASSANDRA-7314)
+ * Reduce run time for CQL tests (CASSANDRA-7327)
+ * Fix heap size calculation on Windows (CASSANDRA-7352, 7353)
+ * RefCount native frames from netty (CASSANDRA-7245)
+ * Use tarball dir instead of /var for default paths (CASSANDRA-7136)
+ * Remove rows_per_partition_to_cache keyword (CASSANDRA-7193)
+ * Fix schema change response in native protocol v3 (CASSANDRA-7413)
+Merged from 2.0:
+ * Fix assertion error in CL.ANY timeout handling (CASSANDRA-7364)
* Add per-CF range read request latency metrics (CASSANDRA-7338)
* Fix NPE in StreamTransferTask.createMessageForRetry() (CASSANDRA-7323)
- * Add conditional CREATE/DROP USER support (CASSANDRA-7264)
- * Swap local and global default read repair chances (CASSANDRA-7320)
- * Add missing iso8601 patterns for date strings (CASSANDRA-6973)
- * Support selecting multiple rows in a partition using IN (CASSANDRA-6875)
- * cqlsh: always emphasize the partition key in DESC output (CASSANDRA-7274)
- * Copy compaction options to make sure they are reloaded (CASSANDRA-7290)
- * Add option to do more aggressive tombstone compactions (CASSANDRA-6563)
- * Don't try to compact already-compacting files in HHOM (CASSANDRA-7288)
- * Add authentication support to shuffle (CASSANDRA-6484)
- * Cqlsh counts non-empty lines for "Blank lines" warning (CASSANDRA-7325)
* Make StreamSession#closeSession() idempotent (CASSANDRA-7262)
* Fix infinite loop on exception while streaming (CASSANDRA-7330)
- * Reference sstables before populating key cache (CASSANDRA-7234)
* Account for range tombstones in min/max column names (CASSANDRA-7235)
* Improve sub range repair validation (CASSANDRA-7317)
* Accept subtypes for function results, type casts (CASSANDRA-6766)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/8c4ffbe6/NEWS.txt
----------------------------------------------------------------------
diff --cc NEWS.txt
index 2cbd963,ea085ae..c35bc11
--- a/NEWS.txt
+++ b/NEWS.txt
@@@ -13,64 -13,15 +13,73 @@@ restore snapshots created with the prev
'sstableloader' tool. You can upgrade the file format of your snapshots
using the provided 'sstableupgrade' tool.
+2.1
+===
+
+New features
+------------
+ - Default data and log locations have changed. If not set in
+ cassandra.yaml, the data file directory, commitlog directory,
+ and saved caches directory will default to $CASSANDRA_HOME/data/data,
+ $CASSANDRA_HOME/data/commitlog, and $CASSANDRA_HOME/data/saved_caches,
+ respectively. The log directory now defaults to $CASSANDRA_HOME/logs.
+ If not set, $CASSANDRA_HOME, defaults to the top-level directory of
+ the installation.
+ Note that this should only affect source checkouts and tarballs.
+ Deb and RPM packages will continue to use /var/lib/cassandra and
+ /var/log/cassandra in cassandra.yaml.
+ - SSTable data directory name is slightly changed. Each directory will
+ have hex string appended after CF name, e.g.
+ ks/cf-5be396077b811e3a3ab9dc4b9ac088d/
+ This hex string part represents unique ColumnFamily ID.
+ Note that existing directories are used as is, so only newly created
+ directories after upgrade have new directory name format.
+ - Saved key cache files also have ColumnFamily ID in their file name.
+ - It is now possible to do incremental repairs, sstables that have been
+ repaired are marked with a timestamp and not included in the next
+ repair session. Use nodetool repair -par -inc to use this feature.
+ A tool to manually mark/unmark sstables as repaired is available in
+ tools/bin/sstablerepairedset. This is particularly important when
+ using LCS, or any data not repaired in your first incremental repair
+ will be put back in L0.
+ - Bootstrapping now ensures that range movements are consistent,
+ meaning the data for the new node is taken from the node that is no
+ longer a responsible for that range of keys.
+ If you want the old behavior (due to a lost node perhaps)
+ you can set the following property (-Dconsistent.rangemovement=false)
+
+Upgrading
+---------
+ - Rolling upgrades from anything pre-2.0.7 is not supported. Furthermore
+ pre-2.0 sstables are not supported. This means that before upgrading
+ a node on 2.1, this node must be started on 2.0 and
+ 'nodetool upgdradesstables' must be run (and this even in the case
+ of not-rolling upgrades).
+ - For size-tiered compaction users, Cassandra now defaults to ignoring
+ the coldest 5% of sstables. This can be customized with the
+ cold_reads_to_omit compaction option; 0.0 omits nothing (the old
+ behavior) and 1.0 omits everything.
+ - Multithreaded compaction has been removed.
+ - Counters implementation has been changed, replaced by a safer one with
+ less caveats, but different performance characteristics. You might have
+ to change your data model to accomodate the new implementation.
+ (See https://issues.apache.org/jira/browse/CASSANDRA-6504 and the dev
+ blog post at http://www.datastax.com/dev/blog/<PLACEHOLDER> for details).
+ - (per-table) index_interval parameter has been replaced with
+ min_index_interval and max_index_interval paratemeters. index_interval
+ has been deprecated.
+ - support for supercolumns has been removed from json2sstable
+
+
+ 2.0.10
+ ====
+ New features
+ ------------
+ - If you are using Leveled Compaction, you can now disable doing size-tiered
+ compaction in L0 by starting Cassandra with -Dcassandra.disable_stcs_in_l0
+ (see CASSANDRA-6621 for details).
+
+
2.0.9
=====
http://git-wip-us.apache.org/repos/asf/cassandra/blob/8c4ffbe6/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/8c4ffbe6/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
index 47eb683,70e5cae..6f2098c
--- a/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
+++ b/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
@@@ -370,9 -268,15 +373,9 @@@ public class LeveledManifes
if (score > 1.001)
{
// before proceeding with a higher level, let's see if L0 is far enough behind to warrant STCS
- if (getLevel(0).size() > MAX_COMPACTING_L0)
- if (!DatabaseDescriptor.getDisableSTCSInL0() && generations[0].size() > MAX_COMPACTING_L0)
++ if (!DatabaseDescriptor.getDisableSTCSInL0() && getLevel(0).size() > MAX_COMPACTING_L0)
{
- Iterable<SSTableReader> candidates = cfs.getDataTracker().getUncompactingSSTables(generations[0]);
- List<Pair<SSTableReader,Long>> pairs = SizeTieredCompactionStrategy.createSSTableAndLengthPairs(AbstractCompactionStrategy.filterSuspectSSTables(candidates));
- List<List<SSTableReader>> buckets = SizeTieredCompactionStrategy.getBuckets(pairs,
- options.bucketHigh,
- options.bucketLow,
- options.minSSTableSize);
- List<SSTableReader> mostInteresting = SizeTieredCompactionStrategy.mostInterestingBucket(buckets, 4, 32);
+ List<SSTableReader> mostInteresting = getSSTablesForSTCS(getLevel(0));
if (!mostInteresting.isEmpty())
{
logger.debug("L0 is too far behind, performing size-tiering there first");