You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jb...@apache.org on 2012/05/18 18:39:38 UTC
[5/5] git commit: log MOVING mode earlier patch by jbellis;
reviewed by Nick Bailey for CASSANDRA-4252
log MOVING mode earlier
patch by jbellis; reviewed by Nick Bailey for CASSANDRA-4252
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/827de3f2
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/827de3f2
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/827de3f2
Branch: refs/heads/cassandra-1.1
Commit: 827de3f2099065c2b6ebff3907155d42861dc5b1
Parents: 38748b4
Author: Jonathan Ellis <jb...@apache.org>
Authored: Fri May 18 11:32:42 2012 -0500
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Fri May 18 11:32:42 2012 -0500
----------------------------------------------------------------------
.../apache/cassandra/service/StorageService.java | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/827de3f2/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 01113df..10f9351 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -2353,10 +2353,8 @@ public class StorageService implements IEndpointStateChangeSubscriber, StorageSe
throw new UnsupportedOperationException("data is currently moving to this node; unable to leave the ring");
}
- // setting 'moving' application state
Gossiper.instance.addLocalApplicationState(ApplicationState.STATUS, valueFactory.moving(newToken));
-
- logger_.info(String.format("Moving %s from %s to %s.", localAddress, getLocalToken(), newToken));
+ setMode(Mode.MOVING, String.format("Moving %s from %s to %s.", localAddress, getLocalToken(), newToken), true);
IEndpointSnitch snitch = DatabaseDescriptor.getEndpointSnitch();
@@ -2425,8 +2423,7 @@ public class StorageService implements IEndpointStateChangeSubscriber, StorageSe
if (!rangesToStreamByTable.isEmpty() || !rangesToFetch.isEmpty())
{
- logger_.info("Sleeping {} ms before start streaming/fetching ranges.", RING_DELAY);
-
+ setMode(Mode.MOVING, String.format("Sleeping %s ms before start streaming/fetching ranges", RING_DELAY), true);
try
{
Thread.sleep(RING_DELAY);
@@ -2437,7 +2434,6 @@ public class StorageService implements IEndpointStateChangeSubscriber, StorageSe
}
setMode(Mode.MOVING, "fetching new ranges and streaming old ranges", true);
-
if (logger_.isDebugEnabled())
logger_.debug("[Move->STREAMING] Work Map: " + rangesToStreamByTable);