You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ja...@apache.org on 2014/05/30 14:47:20 UTC

[1/2] git commit: Hint streaming can cause decommission to fail

Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 7216639e5 -> c2563dbc8


Hint streaming can cause decommission to fail

patch by jasobrown, reviewed by marcuse for CASSANDRA-7219


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/2f497eda
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/2f497eda
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/2f497eda

Branch: refs/heads/cassandra-2.0
Commit: 2f497eda0f121fce68256e18748d04bd7cbfe032
Parents: ea26dbd
Author: Jason Brown <ja...@apple.com>
Authored: Fri May 30 05:40:30 2014 -0700
Committer: Jason Brown <ja...@apple.com>
Committed: Fri May 30 05:40:30 2014 -0700

----------------------------------------------------------------------
 CHANGES.txt                                               | 1 +
 src/java/org/apache/cassandra/service/StorageService.java | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2f497eda/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index ba3a675..ef5f72a 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -26,6 +26,7 @@
  * exit CQLSH with error status code if script fails (CASSANDRA-6344)
  * Fix bug with some IN queries missig results (CASSANDRA-7105)
  * Fix availability validation for LOCAL_ONE CL (CASSANDRA-7319)
+ * Hint streaming can cause decommission to fail (CASSANDRA-7219)
 
 
 1.2.16

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2f497eda/src/java/org/apache/cassandra/service/StorageService.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/StorageService.java b/src/java/org/apache/cassandra/service/StorageService.java
index 8e7c073..494da33 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -2966,7 +2966,8 @@ public class StorageService extends NotificationBroadcasterSupport implements IE
 
     private CountDownLatch streamHints()
     {
-        if (HintedHandOffManager.instance.listEndpointsPendingHints().size() == 0)
+        ColumnFamilyStore hintsCF = Table.open(Table.SYSTEM_KS).getColumnFamilyStore(SystemTable.HINTS_CF);
+        if (hintsCF.getMemtableColumnsCount() == 0 && hintsCF.estimateKeys() == 0)
             return new CountDownLatch(0);
 
         // gather all live nodes in the cluster that aren't also leaving


[2/2] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0

Posted by ja...@apache.org.
Merge branch 'cassandra-1.2' into cassandra-2.0

Conflicts:
	CHANGES.txt
	src/java/org/apache/cassandra/service/StorageService.java


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c2563dbc
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c2563dbc
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c2563dbc

Branch: refs/heads/cassandra-2.0
Commit: c2563dbc8b83437dc825ac6c0969ccb5b8e5d55e
Parents: 7216639 2f497ed
Author: Jason Brown <ja...@apple.com>
Authored: Fri May 30 05:47:05 2014 -0700
Committer: Jason Brown <ja...@apple.com>
Committed: Fri May 30 05:47:05 2014 -0700

----------------------------------------------------------------------
 CHANGES.txt                                               | 2 ++
 src/java/org/apache/cassandra/service/StorageService.java | 5 +++--
 2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c2563dbc/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 28c2ad6,ef5f72a..75e6759
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -71,61 -25,11 +71,63 @@@ Merged from 1.2
   * reduce garbage creation in calculatePendingRanges (CASSANDRA-7191)
   * exit CQLSH with error status code if script fails (CASSANDRA-6344)
   * Fix bug with some IN queries missig results (CASSANDRA-7105)
+  * Fix availability validation for LOCAL_ONE CL (CASSANDRA-7319)
+  * Hint streaming can cause decommission to fail (CASSANDRA-7219)
  
  
 -1.2.16
 +2.0.7
 + * Put nodes in hibernate when join_ring is false (CASSANDRA-6961)
 + * Avoid early loading of non-system keyspaces before compaction-leftovers 
 +   cleanup at startup (CASSANDRA-6913)
 + * Restrict Windows to parallel repairs (CASSANDRA-6907)
 + * (Hadoop) Allow manually specifying start/end tokens in CFIF (CASSANDRA-6436)
 + * Fix NPE in MeteredFlusher (CASSANDRA-6820)
 + * Fix race processing range scan responses (CASSANDRA-6820)
 + * Allow deleting snapshots from dropped keyspaces (CASSANDRA-6821)
 + * Add uuid() function (CASSANDRA-6473)
 + * Omit tombstones from schema digests (CASSANDRA-6862)
 + * Include correct consistencyLevel in LWT timeout (CASSANDRA-6884)
 + * Lower chances for losing new SSTables during nodetool refresh and
 +   ColumnFamilyStore.loadNewSSTables (CASSANDRA-6514)
 + * Add support for DELETE ... IF EXISTS to CQL3 (CASSANDRA-5708)
 + * Update hadoop_cql3_word_count example (CASSANDRA-6793)
 + * Fix handling of RejectedExecution in sync Thrift server (CASSANDRA-6788)
 + * Log more information when exceeding tombstone_warn_threshold (CASSANDRA-6865)
 + * Fix truncate to not abort due to unreachable fat clients (CASSANDRA-6864)
 + * Fix schema concurrency exceptions (CASSANDRA-6841)
 + * Fix leaking validator FH in StreamWriter (CASSANDRA-6832)
 + * Fix saving triggers to schema (CASSANDRA-6789)
 + * Fix trigger mutations when base mutation list is immutable (CASSANDRA-6790)
 + * Fix accounting in FileCacheService to allow re-using RAR (CASSANDRA-6838)
 + * Fix static counter columns (CASSANDRA-6827)
 + * Restore expiring->deleted (cell) compaction optimization (CASSANDRA-6844)
 + * Fix CompactionManager.needsCleanup (CASSANDRA-6845)
 + * Correctly compare BooleanType values other than 0 and 1 (CASSANDRA-6779)
 + * Read message id as string from earlier versions (CASSANDRA-6840)
 + * Properly use the Paxos consistency for (non-protocol) batch (CASSANDRA-6837)
 + * Add paranoid disk failure option (CASSANDRA-6646)
 + * Improve PerRowSecondaryIndex performance (CASSANDRA-6876)
 + * Extend triggers to support CAS updates (CASSANDRA-6882)
 + * Static columns with IF NOT EXISTS don't always work as expected (CASSANDRA-6873)
 + * Fix paging with SELECT DISTINCT (CASSANDRA-6857)
 + * Fix UnsupportedOperationException on CAS timeout (CASSANDRA-6923)
 + * Improve MeteredFlusher handling of MF-unaffected column families
 +   (CASSANDRA-6867)
 + * Add CqlRecordReader using native pagination (CASSANDRA-6311)
 + * Add QueryHandler interface (CASSANDRA-6659)
 + * Track liveRatio per-memtable, not per-CF (CASSANDRA-6945)
 + * Make sure upgradesstables keeps sstable level (CASSANDRA-6958)
 + * Fix LIMIT with static columns (CASSANDRA-6956)
 + * Fix clash with CQL column name in thrift validation (CASSANDRA-6892)
 + * Fix error with super columns in mixed 1.2-2.0 clusters (CASSANDRA-6966)
 + * Fix bad skip of sstables on slice query with composite start/finish (CASSANDRA-6825)
 + * Fix unintended update with conditional statement (CASSANDRA-6893)
 + * Fix map element access in IF (CASSANDRA-6914)
 + * Avoid costly range calculations for range queries on system keyspaces
 +   (CASSANDRA-6906)
 + * Fix SSTable not released if stream session fails (CASSANDRA-6818)
 + * Avoid build failure due to ANTLR timeout (CASSANDRA-6991)
 +Merged from 1.2:
   * Add UNLOGGED, COUNTER options to BATCH documentation (CASSANDRA-6816)
   * add extra SSL cipher suites (CASSANDRA-6613)
   * fix nodetool getsstables for blob PK (CASSANDRA-6803)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c2563dbc/src/java/org/apache/cassandra/service/StorageService.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/service/StorageService.java
index d261a47,494da33..f74df82
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@@ -3016,10 -2964,11 +3016,11 @@@ public class StorageService extends Not
          onFinish.run();
      }
  
 -    private CountDownLatch streamHints()
 +    private Future<StreamState> streamHints()
      {
-         if (HintedHandOffManager.instance.listEndpointsPendingHints().size() == 0)
-             return Futures.immediateFuture(null);
 -        ColumnFamilyStore hintsCF = Table.open(Table.SYSTEM_KS).getColumnFamilyStore(SystemTable.HINTS_CF);
 -        if (hintsCF.getMemtableColumnsCount() == 0 && hintsCF.estimateKeys() == 0)
 -            return new CountDownLatch(0);
++        // StreamPlan will not fail if there are zero files to transfer, so flush anyway (need to get any in-memory hints, as well)
++        ColumnFamilyStore hintsCF = Keyspace.open(Keyspace.SYSTEM_KS).getColumnFamilyStore(SystemKeyspace.HINTS_CF);
++        FBUtilities.waitOnFuture(hintsCF.forceFlush());
  
          // gather all live nodes in the cluster that aren't also leaving
          List<InetAddress> candidates = new ArrayList<InetAddress>(StorageService.instance.getTokenMetadata().cloneAfterAllLeft().getAllEndpoints());