Updated Branches:
  refs/heads/trunk 03ea58a94 -> cc112ae30

actually bail when storing hints for pre-1.2 node (as advertised)

Patch by eevans; reviewed by jbellis for CASSANDRA-4227


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

Branch: refs/heads/trunk
Commit: cc112ae30a2ac7afa09930929db0b6adc8f64ca0
Parents: 03ea58a
Author: Eric Evans <[email protected]>
Authored: Wed May 23 15:58:44 2012 -0500
Committer: Eric Evans <[email protected]>
Committed: Wed May 23 15:58:44 2012 -0500

----------------------------------------------------------------------
 NEWS.txt                                           |    4 +++-
 .../org/apache/cassandra/service/StorageProxy.java |    6 +++++-
 2 files changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/cc112ae3/NEWS.txt
----------------------------------------------------------------------
diff --git a/NEWS.txt b/NEWS.txt
index 0748f58..400b29b 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -27,7 +27,9 @@ Upgrading
     - The hints schema was changed from 1.1 to 1.2. Cassandra automatically
       snapshots and then truncates the hints column family as part of
       starting up 1.2 for the first time.  Additionally, upgraded nodes
-      will not store new hints destined for older (pre-1.2) nodes.
+      will not store new hints destined for older (pre-1.2) nodes.  It is
+      therefore recommended that you perform a cluster upgrade when all
+      nodes are up.
     - The `nodetool removetoken` command (and corresponding JMX operation)
       have been renamed to `nodetool removenode`.  This function is
       incompatible with the earlier `nodetool removetoken`, and attempts to

http://git-wip-us.apache.org/repos/asf/cassandra/blob/cc112ae3/src/java/org/apache/cassandra/service/StorageProxy.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/StorageProxy.java 
b/src/java/org/apache/cassandra/service/StorageProxy.java
index 9fad95a..c76c3c4 100644
--- a/src/java/org/apache/cassandra/service/StorageProxy.java
+++ b/src/java/org/apache/cassandra/service/StorageProxy.java
@@ -363,7 +363,11 @@ public class StorageProxy implements StorageProxyMBean
                 {
                     UUID hostId = 
StorageService.instance.getTokenMetadata().getHostId(target);
                     if ((hostId == null) && 
(Gossiper.instance.getVersion(target) < MessagingService.VERSION_12))
-                        logger.info("Unable to store hint for host with 
missing ID, {} (old node?)", target.toString());
+                    {
+                        logger.warn("Unable to store hint for host with 
missing ID, {} (old node?)", target.toString());
+                        return;
+                    }
+                    assert hostId != null : "Missing host ID for " + 
target.getHostAddress();
                     RowMutation hintedMutation = RowMutation.hintFor(mutation, 
ByteBuffer.wrap(UUIDGen.decompose(hostId)));
                     hintedMutation.apply();
 

Reply via email to