cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marc...@apache.org
Subject [10/13] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
Date Tue, 23 Feb 2016 10:16:59 GMT
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/c8c8cf67
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c8c8cf67
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c8c8cf67

Branch: refs/heads/trunk
Commit: c8c8cf679c0e597dd741d0780a1c2ac5e0113251
Parents: fbf30d2 67637d1
Author: Marcus Eriksson <marcuse@apache.org>
Authored: Tue Feb 23 11:12:01 2016 +0100
Committer: Marcus Eriksson <marcuse@apache.org>
Committed: Tue Feb 23 11:13:18 2016 +0100

----------------------------------------------------------------------
 CHANGES.txt                                              |  1 +
 .../cassandra/db/compaction/CompactionManager.java       | 11 ++++++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c8c8cf67/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index e3d6f95,52bdcce..767eb8a
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,21 -1,5 +1,22 @@@
 -2.1.14
 +2.2.6
 + * Replacing an aggregate with a new version doesn't reset INITCOND (CASSANDRA-10840)
 + * (cqlsh) cqlsh cannot be called through symlink (CASSANDRA-11037)
 + * fix ohc and java-driver pom dependencies in build.xml (CASSANDRA-10793)
 + * Protect from keyspace dropped during repair (CASSANDRA-11065)
 + * Handle adding fields to a UDT in SELECT JSON and toJson() (CASSANDRA-11146)
 + * Better error message for cleanup (CASSANDRA-10991)
 + * cqlsh pg-style-strings broken if line ends with ';' (CASSANDRA-11123)
 + * Use cloned TokenMetadata in size estimates to avoid race against membership check
 +   (CASSANDRA-10736)
 + * Always persist upsampled index summaries (CASSANDRA-10512)
 + * (cqlsh) Fix inconsistent auto-complete (CASSANDRA-10733)
 + * Make SELECT JSON and toJson() threadsafe (CASSANDRA-11048)
 + * Fix SELECT on tuple relations for mixed ASC/DESC clustering order (CASSANDRA-7281)
 + * (cqlsh) Support utf-8/cp65001 encoding on Windows (CASSANDRA-11030)
 + * Fix paging on DISTINCT queries repeats result when first row in partition changes
 +   (CASSANDRA-10010)
 +Merged from 2.1:
+  * Only notify if repair status changed (CASSANDRA-11172)
   * Add partition key to TombstoneOverwhelmingException error message (CASSANDRA-10888)
   * Use logback setting for 'cassandra -v' command (CASSANDRA-10767)
   * Fix sstableloader to unthrottle streaming by default (CASSANDRA-9714)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c8c8cf67/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/compaction/CompactionManager.java
index 44d7efb,ec7cb45..9ca4406
--- a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
@@@ -484,14 -467,20 +484,21 @@@ public class CompactionManager implemen
      public void performAnticompaction(ColumnFamilyStore cfs,
                                        Collection<Range<Token>> ranges,
                                        Refs<SSTableReader> validatedForRepair,
 -                                      long repairedAt) throws InterruptedException, ExecutionException,
IOException
 +                                      LifecycleTransaction txn,
 +                                      long repairedAt) throws InterruptedException, IOException
      {
          logger.info("Starting anticompaction for {}.{} on {}/{} sstables", cfs.keyspace.getName(),
cfs.getColumnFamilyName(), validatedForRepair.size(), cfs.getSSTables().size());
 -        logger.debug("Starting anticompaction for ranges {}", ranges);
 +        logger.trace("Starting anticompaction for ranges {}", ranges);
          Set<SSTableReader> sstables = new HashSet<>(validatedForRepair);
          Set<SSTableReader> mutatedRepairStatuses = new HashSet<>();
+         // we should only notify that repair status changed if it actually did:
+         Set<SSTableReader> mutatedRepairStatusToNotify = new HashSet<>();
+         Map<SSTableReader, Boolean> wasRepairedBefore = new HashMap<>();
+         for (SSTableReader sstable : sstables)
+             wasRepairedBefore.put(sstable, sstable.isRepaired());
+ 
          Set<SSTableReader> nonAnticompacting = new HashSet<>();
+ 
          Iterator<SSTableReader> sstableIterator = sstables.iterator();
          try
          {
@@@ -531,13 -522,11 +540,13 @@@
                      sstableIterator.remove();
                  }
              }
-             cfs.getTracker().notifySSTableRepairedStatusChanged(mutatedRepairStatuses);
++            cfs.getTracker().notifySSTableRepairedStatusChanged(mutatedRepairStatusToNotify);
 +            txn.cancel(Sets.union(nonAnticompacting, mutatedRepairStatuses));
              validatedForRepair.release(Sets.union(nonAnticompacting, mutatedRepairStatuses));
 -            cfs.getDataTracker().notifySSTableRepairedStatusChanged(mutatedRepairStatusToNotify);
 -            cfs.getDataTracker().unmarkCompacting(Sets.union(nonAnticompacting, mutatedRepairStatuses));
 +            assert txn.originals().equals(sstables);
              if (!sstables.isEmpty())
 -                doAntiCompaction(cfs, ranges, sstables, repairedAt);
 +                doAntiCompaction(cfs, ranges, txn, repairedAt);
 +            txn.finish();
          }
          finally
          {


Mime
View raw message