Merge branch 'cassandra-2.1' into cassandra-2.2
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/968b1340 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/968b1340 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/968b1340 Branch: refs/heads/cassandra-2.2 Commit: 968b1340a5a12baa649306f4ba793a8abac16cec Parents: e66dcc7 98cc2c8 Author: Marcus Eriksson <marc...@apache.org> Authored: Thu Jan 21 09:03:50 2016 +0100 Committer: Marcus Eriksson <marc...@apache.org> Committed: Thu Jan 21 09:03:50 2016 +0100 ---------------------------------------------------------------------- CHANGES.txt | 1 + .../org/apache/cassandra/service/ActiveRepairService.java | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/968b1340/CHANGES.txt ---------------------------------------------------------------------- diff --cc CHANGES.txt index 7003c9c,7175953..ae3082a --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,26 -1,7 +1,27 @@@ -2.1.13 +2.2.5 + * Make UUID LSB unique per process (CASSANDRA-7925) + * Avoid NPE when performing sstable tasks (scrub etc.) (CASSANDRA-10980) + * Make sure client gets tombstone overwhelmed warning (CASSANDRA-9465) + * Fix error streaming section more than 2GB (CASSANDRA-10961) + * (cqlsh) Also apply --connect-timeout to control connection + timeout (CASSANDRA-10959) + * Histogram buckets exposed in jmx are sorted incorrectly (CASSANDRA-10975) + * Enable GC logging by default (CASSANDRA-10140) + * Optimize pending range computation (CASSANDRA-9258) + * Skip commit log and saved cache directories in SSTable version startup check (CASSANDRA-10902) + * drop/alter user should be case sensitive (CASSANDRA-10817) + * jemalloc detection fails due to quoting issues in regexv (CASSANDRA-10946) + * Support counter-columns for native aggregates (sum,avg,max,min) (CASSANDRA-9977) + * (cqlsh) show correct column names for empty result sets (CASSANDRA-9813) + * Add new types to Stress (CASSANDRA-9556) + * Add property to allow listening on broadcast interface (CASSANDRA-9748) + * Fix regression in split size on CqlInputFormat (CASSANDRA-10835) + * Better handling of SSL connection errors inter-node (CASSANDRA-10816) + * Disable reloading of GossipingPropertyFileSnitch (CASSANDRA-9474) + * Verify tables in pseudo-system keyspaces at startup (CASSANDRA-10761) +Merged from 2.1: + * Avoid NPE when incremental repair fails (CASSANDRA-10909) * Unmark sstables compacting once they are done in cleanup/scrub/upgradesstables (CASSANDRA-10829) - * Revert CASSANDRA-10012 and add more logging (CASSANDRA-10961) * Allow simultaneous bootstrapping with strict consistency when no vnodes are used (CASSANDRA-11005) * Log a message when major compaction does not result in a single file (CASSANDRA-10847) * (cqlsh) fix cqlsh_copy_tests when vnodes are disabled (CASSANDRA-10997) http://git-wip-us.apache.org/repos/asf/cassandra/blob/968b1340/src/java/org/apache/cassandra/service/ActiveRepairService.java ---------------------------------------------------------------------- diff --cc src/java/org/apache/cassandra/service/ActiveRepairService.java index 61f4196,732267e..9ac1186 --- a/src/java/org/apache/cassandra/service/ActiveRepairService.java +++ b/src/java/org/apache/cassandra/service/ActiveRepairService.java @@@ -421,33 -426,22 +421,32 @@@ public class ActiveRepairServic public static class ParentRepairSession { - public final Map<UUID, ColumnFamilyStore> columnFamilyStores = new HashMap<>(); - public final Collection<Range<Token>> ranges; - public final Map<UUID, Set<SSTableReader>> sstableMap = new HashMap<>(); - public final long repairedAt; - - public ParentRepairSession(List<ColumnFamilyStore> columnFamilyStores, Collection<Range<Token>> ranges, long repairedAt) + private final Map<UUID, ColumnFamilyStore> columnFamilyStores = new HashMap<>(); + private final Collection<Range<Token>> ranges; + private final Map<UUID, Set<SSTableReader>> sstableMap = new HashMap<>(); + private final long repairedAt; + public final boolean isIncremental; + private final boolean isGlobal; + + public ParentRepairSession(List<ColumnFamilyStore> columnFamilyStores, Collection<Range<Token>> ranges, boolean isIncremental, boolean isGlobal, long repairedAt) { for (ColumnFamilyStore cfs : columnFamilyStores) + { this.columnFamilyStores.put(cfs.metadata.cfId, cfs); + sstableMap.put(cfs.metadata.cfId, new HashSet<SSTableReader>()); + } this.ranges = ranges; this.repairedAt = repairedAt; + this.isGlobal = isGlobal; + this.isIncremental = isIncremental; } + public void addSSTables(UUID cfId, Set<SSTableReader> sstables) + { - Set<SSTableReader> existingSSTables = this.sstableMap.get(cfId); - if (existingSSTables == null) - existingSSTables = new HashSet<>(); - existingSSTables.addAll(sstables); - this.sstableMap.put(cfId, existingSSTables); ++ sstableMap.get(cfId).addAll(sstables); + } + + @SuppressWarnings("resource") public synchronized Refs<SSTableReader> getAndReferenceSSTables(UUID cfId) { Set<SSTableReader> sstables = sstableMap.get(cfId);