Merge branch 'cassandra-2.0' into cassandra-2.1.0 Conflicts: CHANGES.txt src/java/org/apache/cassandra/db/DataTracker.java 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/ef890455 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/ef890455 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/ef890455 Branch: refs/heads/trunk Commit: ef890455061dcbbda5d9d1cad187fc43a664f4d4 Parents: de62175 968ffd8 Author: Marcus Eriksson <marc...@apache.org> Authored: Mon Sep 1 15:41:57 2014 +0200 Committer: Marcus Eriksson <marc...@apache.org> Committed: Mon Sep 1 15:41:57 2014 +0200 ---------------------------------------------------------------------- CHANGES.txt | 1 + src/java/org/apache/cassandra/db/DataTracker.java | 12 ++++++++++++ .../apache/cassandra/db/compaction/LeveledManifest.java | 5 ++++- .../org/apache/cassandra/io/sstable/SSTableReader.java | 5 +++++ 4 files changed, 22 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/ef890455/CHANGES.txt ---------------------------------------------------------------------- diff --cc CHANGES.txt index c202586,6d77f3c..477a332 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -20,39 -14,24 +20,40 @@@ Merged from 2.0 * Configure system.paxos with LeveledCompactionStrategy (CASSANDRA-7753) * Fix ALTER clustering column type from DateType to TimestampType when using DESC clustering order (CASSANRDA-7797) - * Stop inheriting liveRatio and liveRatioComputedAt from previous - memtables (CASSANDRA-7796) * Throw EOFException if we run out of chunks in compressed datafile (CASSANDRA-7664) - * Throw InvalidRequestException when queries contain relations on entire - collection columns (CASSANDRA-7506) * Fix PRSI handling of CQL3 row markers for row cleanup (CASSANDRA-7787) - * (cqlsh) enable CTRL-R history search with libedit (CASSANDRA-7577) * Fix dropping collection when it's the last regular column (CASSANDRA-7744) * Properly reject operations on list index with conditions (CASSANDRA-7499) - * (Hadoop) allow ACFRW to limit nodes to local DC (CASSANDRA-7252) + * Make StreamReceiveTask thread safe and gc friendly (CASSANDRA-7795) + * Validate empty cell names from counter updates (CASSANDRA-7798) +Merged from 1.2: ++ * Don't allow compacted sstables to be marked as compacting (CASSANDRA-7145) + * Track expired tombstones (CASSANDRA-7810) + + +2.1.0-rc6 + * Fix OOM issue from netty caching over time (CASSANDRA-7743) + * json2sstable couldn't import JSON for CQL table (CASSANDRA-7477) + * Invalidate all caches on table drop (CASSANDRA-7561) + * Skip strict endpoint selection for ranges if RF == nodes (CASSANRA-7765) + * Fix Thrift range filtering without 2ary index lookups (CASSANDRA-7741) + * Add tracing entries about concurrent range requests (CASSANDRA-7599) + * (cqlsh) Fix DESCRIBE for NTS keyspaces (CASSANDRA-7729) + * Remove netty buffer ref-counting (CASSANDRA-7735) + * Pass mutated cf to index updater for use by PRSI (CASSANDRA-7742) + * Include stress yaml example in release and deb (CASSANDRA-7717) + * workaround for netty issue causing corrupted data off the wire (CASSANDRA-7695) + * cqlsh DESC CLUSTER fails retrieving ring information (CASSANDRA-7687) + * Fix binding null values inside UDT (CASSANDRA-7685) + * Fix UDT field selection with empty fields (CASSANDRA-7670) + * Bogus deserialization of static cells from sstable (CASSANDRA-7684) + * Fix NPE on compaction leftover cleanup for dropped table (CASSANDRA-7770) +Merged from 2.0: * (cqlsh) Wait up to 10 sec for a tracing session (CASSANDRA-7222) * Fix NPE in FileCacheService.sizeInBytes (CASSANDRA-7756) - * (cqlsh) cqlsh should automatically disable tracing when selecting - from system_traces (CASSANDRA-7641) - * (Hadoop) Add CqlOutputFormat (CASSANDRA-6927) - * Don't depend on cassandra config for nodetool ring (CASSANDRA-7508) - * (cqlsh) Fix failing cqlsh formatting tests (CASSANDRA-7703) + * Remove duplicates from StorageService.getJoiningNodes (CASSANDRA-7478) + * Clone token map outside of hot gossip loops (CASSANDRA-7758) * Fix MS expiring map timeout for Paxos messages (CASSANDRA-7752) * Do not flush on truncate if durable_writes is false (CASSANDRA-7750) * Give CRR a default input_cql Statement (CASSANDRA-7226) http://git-wip-us.apache.org/repos/asf/cassandra/blob/ef890455/src/java/org/apache/cassandra/db/DataTracker.java ---------------------------------------------------------------------- diff --cc src/java/org/apache/cassandra/db/DataTracker.java index 097d8cc,d41181b..857e8bd --- a/src/java/org/apache/cassandra/db/DataTracker.java +++ b/src/java/org/apache/cassandra/db/DataTracker.java @@@ -192,18 -199,26 +192,30 @@@ public class DataTracke public boolean markCompacting(Iterable<SSTableReader> sstables) { assert sstables != null && !Iterables.isEmpty(sstables); - - View currentView = view.get(); - Set<SSTableReader> inactive = Sets.difference(ImmutableSet.copyOf(sstables), currentView.compacting); - if (inactive.size() < Iterables.size(sstables)) - return false; - - if (Iterables.any(sstables, new Predicate<SSTableReader>() + while (true) { - @Override - public boolean apply(SSTableReader sstable) + View currentView = view.get(); + Set<SSTableReader> set = ImmutableSet.copyOf(sstables); + Set<SSTableReader> inactive = Sets.difference(set, currentView.compacting); + if (inactive.size() < set.size()) + return false; + ++ if (Iterables.any(set, new Predicate<SSTableReader>() ++ { ++ @Override ++ public boolean apply(SSTableReader sstable) ++ { ++ return sstable.isMarkedCompacted(); ++ } ++ })) + { - return sstable.isMarkedCompacted(); ++ return false; + } - })) - { - return false; - } + - View newView = currentView.markCompacting(inactive); - return view.compareAndSet(currentView, newView); + View newView = currentView.markCompacting(set); + if (view.compareAndSet(currentView, newView)) + return true; + } } /** http://git-wip-us.apache.org/repos/asf/cassandra/blob/ef890455/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java ---------------------------------------------------------------------- diff --cc src/java/org/apache/cassandra/db/compaction/LeveledManifest.java index 6f2098c,b704523..deb1380 --- a/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java +++ b/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java @@@ -644,7 -534,10 +644,10 @@@ public class LeveledManifes // add sstables from L1 that overlap candidates // if the overlapping ones are already busy in a compaction, leave it out. // TODO try to find a set of L0 sstables that only overlaps with non-busy L1 sstables - candidates = Sets.union(candidates, overlapping(candidates, getLevel(1))); - Set<SSTableReader> l1overlapping = overlapping(candidates, generations[1]); ++ Set<SSTableReader> l1overlapping = overlapping(candidates, getLevel(1)); + if (Sets.intersection(l1overlapping, compacting).size() > 0) + return Collections.emptyList(); + candidates = Sets.union(candidates, l1overlapping); } if (candidates.size() < 2) return Collections.emptyList(); http://git-wip-us.apache.org/repos/asf/cassandra/blob/ef890455/src/java/org/apache/cassandra/io/sstable/SSTableReader.java ----------------------------------------------------------------------