You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by sp...@apache.org on 2017/04/03 18:17:47 UTC

[3/6] cassandra git commit: Fix hint delivery when prefer_local enabled

Fix hint delivery when prefer_local enabled

patch by Stefan Podkowinski; reviewed by Aleksey Yeschenko for CASSANDRA-13020


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

Branch: refs/heads/trunk
Commit: 2e36eb6ca38dd018e7ef0cda61d43ec9a7eb144c
Parents: 13e6699
Author: Stefan Podkowinski <s....@gmail.com>
Authored: Fri Mar 10 14:34:29 2017 +0100
Committer: Stefan Podkowinski <s....@gmail.com>
Committed: Mon Apr 3 20:10:52 2017 +0200

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2e36eb6c/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 371abed..41489c1 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.13
+ * Fix hint delivery when using ext+internal IPs with prefer_local enabled (CASSANDRA-13020)
  * Fix possible NPE on upgrade to 3.0/3.X in case of IO errors (CASSANDRA-13389)
  * Legacy deserializer can create empty range tombstones (CASSANDRA-13341)
  * Use the Kernel32 library to retrieve the PID on Windows and fix startup checks (CASSANDRA-13333)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2e36eb6c/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 6760040..aa3407b 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -3655,8 +3655,7 @@ public class StorageService extends NotificationBroadcasterSupport implements IE
             // stream to the closest peer as chosen by the snitch
             DatabaseDescriptor.getEndpointSnitch().sortByProximity(FBUtilities.getBroadcastAddress(), candidates);
             InetAddress hintsDestinationHost = candidates.get(0);
-            InetAddress preferred = SystemKeyspace.getPreferredIP(hintsDestinationHost);
-            return tokenMetadata.getHostId(preferred);
+            return tokenMetadata.getHostId(hintsDestinationHost);
         }
     }