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/10/17 19:18:27 UTC
git commit: Fix NTS test
Updated Branches:
refs/heads/trunk eb775fe7c -> c866c805b
Fix NTS test
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c866c805
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c866c805
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c866c805
Branch: refs/heads/trunk
Commit: c866c805b3d379794bc063dfe3f300f061d01d68
Parents: eb775fe
Author: Sylvain Lebresne <sy...@datastax.com>
Authored: Wed Oct 17 19:18:18 2012 +0200
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Wed Oct 17 19:18:18 2012 +0200
----------------------------------------------------------------------
.../cassandra/locator/PropertyFileSnitch.java | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/c866c805/src/java/org/apache/cassandra/locator/PropertyFileSnitch.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/locator/PropertyFileSnitch.java b/src/java/org/apache/cassandra/locator/PropertyFileSnitch.java
index a30334d..e99fedf 100644
--- a/src/java/org/apache/cassandra/locator/PropertyFileSnitch.java
+++ b/src/java/org/apache/cassandra/locator/PropertyFileSnitch.java
@@ -53,6 +53,8 @@ public class PropertyFileSnitch extends AbstractNetworkTopologySnitch
private static volatile Map<InetAddress, String[]> endpointMap;
private static volatile String[] defaultDCRack;
+ private volatile boolean gossipStarted;
+
public PropertyFileSnitch() throws ConfigurationException
{
reloadConfiguration();
@@ -185,6 +187,13 @@ public class PropertyFileSnitch extends AbstractNetworkTopologySnitch
if (StorageService.instance != null) // null check tolerates circular dependency; see CASSANDRA-4145
StorageService.instance.getTokenMetadata().invalidateCaches();
- StorageService.instance.gossipSnitchInfo();
+ if (gossipStarted)
+ StorageService.instance.gossipSnitchInfo();
+ }
+
+ @Override
+ public void gossiperStarting()
+ {
+ gossipStarted = true;
}
}