You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by sl...@apache.org on 2012/05/04 10:19:27 UTC

git commit: Fix exception during move when localhost is the only source

Updated Branches:
  refs/heads/cassandra-1.1 aea4510e4 -> 655a74850


Fix exception during move when localhost is the only source

patch by slebresne; reviewed by vijay for CASSANDRA-4200


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

Branch: refs/heads/cassandra-1.1
Commit: 655a748502cdef15ffddc4fa17b68c49b0f11ea8
Parents: aea4510
Author: Sylvain Lebresne <sy...@datastax.com>
Authored: Fri May 4 10:18:27 2012 +0200
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Fri May 4 10:18:27 2012 +0200

----------------------------------------------------------------------
 CHANGES.txt                                        |    1 +
 .../org/apache/cassandra/dht/RangeStreamer.java    |    4 ++++
 2 files changed, 5 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/655a7485/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 1b86758..6df2585 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -33,6 +33,7 @@
  * (cql3) Reduce the list of reserved keywords (CASSANDRA-4186)
  * (cql3) Move max/min compaction thresholds to compaction strategy options
    (CASSANDRA-4187)
+ * Fix exception during move when localhost is the only source (CASSANDRA-4200)
 Merged from 1.0:
  * Fix super columns bug where cache is not updated (CASSANDRA-4190)
  * fix maxTimestamp to include row tombstones (CASSANDRA-4116)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/655a7485/src/java/org/apache/cassandra/dht/RangeStreamer.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/dht/RangeStreamer.java b/src/java/org/apache/cassandra/dht/RangeStreamer.java
index 6f7beb0..4e5cfb8 100644
--- a/src/java/org/apache/cassandra/dht/RangeStreamer.java
+++ b/src/java/org/apache/cassandra/dht/RangeStreamer.java
@@ -180,7 +180,11 @@ public class RangeStreamer
             for (InetAddress address : rangesWithSources.get(range))
             {
                 if (address.equals(FBUtilities.getBroadcastAddress()))
+                {
+                    // If localhost is a source, we have found one, but we don't add it to the map to avoid streaming locally
+                    foundSource = true;
                     continue;
+                }
 
                 for (ISourceFilter filter : sourceFilters)
                 {