Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DC12B96A1 for ; Fri, 4 May 2012 08:52:35 +0000 (UTC) Received: (qmail 39251 invoked by uid 500); 4 May 2012 08:52:35 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 39122 invoked by uid 500); 4 May 2012 08:52:35 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 39005 invoked by uid 99); 4 May 2012 08:52:34 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 May 2012 08:52:34 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 378CC13D6D; Fri, 4 May 2012 08:52:34 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: slebresne@apache.org To: commits@cassandra.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [2/3] git commit: Fix exception during move when localhost is the only source Message-Id: <20120504085234.378CC13D6D@tyr.zones.apache.org> Date: Fri, 4 May 2012 08:52:34 +0000 (UTC) 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/trunk Commit: 655a748502cdef15ffddc4fa17b68c49b0f11ea8 Parents: aea4510 Author: Sylvain Lebresne Authored: Fri May 4 10:18:27 2012 +0200 Committer: Sylvain Lebresne 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) {