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/02/06 00:58:06 UTC
[2/2] git commit: don't wait for migration_request reply, to avoid
deadlock patch by Peter Schuller; reviewed by jbellis for CASSANDRA-3832
don't wait for migration_request reply, to avoid deadlock
patch by Peter Schuller; reviewed by jbellis for CASSANDRA-3832
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/270850d7
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/270850d7
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/270850d7
Branch: refs/heads/trunk
Commit: 270850d793aa1a8ed408f682479117f3f8ff3f6b
Parents: cbac7af
Author: Jonathan Ellis <jb...@apache.org>
Authored: Sun Feb 5 17:22:40 2012 -0600
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Sun Feb 5 17:22:40 2012 -0600
----------------------------------------------------------------------
CHANGES.txt | 2 +-
.../apache/cassandra/service/MigrationManager.java | 9 +++++----
2 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/270850d7/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 44b53bc..cc044b9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -52,7 +52,7 @@
* Allow rangeSlice queries to be start/end inclusive/exclusive (CASSANDRA-3749)
* Fix BulkLoader to support new SSTable layout and add stream
throttling to prevent an NPE when there is no yaml config (CASSANDRA-3752)
- * Allow concurrent schema migrations (CASSANDRA-1391)
+ * Allow concurrent schema migrations (CASSANDRA-1391, 3832)
* Add SnapshotCommand to trigger snapshot on remote node (CASSANDRA-3721)
* Make CFMetaData conversions to/from thrift/native schema inverses
(CASSANDRA_3559)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/270850d7/src/java/org/apache/cassandra/service/MigrationManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/MigrationManager.java b/src/java/org/apache/cassandra/service/MigrationManager.java
index 7771815..0d8df1d 100644
--- a/src/java/org/apache/cassandra/service/MigrationManager.java
+++ b/src/java/org/apache/cassandra/service/MigrationManager.java
@@ -91,10 +91,13 @@ public class MigrationManager implements IEndpointStateChangeSubscriber
/**
* if versions differ this node sends request with local migration list to the endpoint
- * and expecting to receive a list of migrations to apply locally
+ * and expecting to receive a list of migrations to apply locally.
+ *
+ * Do not de-ref the future because that causes distributed deadlock (CASSANDRA-3832) because we are
+ * running in the gossip stage.
*/
- Future f = StageManager.getStage(Stage.MIGRATION).submit(new WrappedRunnable()
+ StageManager.getStage(Stage.MIGRATION).submit(new WrappedRunnable()
{
public void runMayThrow() throws Exception
{
@@ -128,8 +131,6 @@ public class MigrationManager implements IEndpointStateChangeSubscriber
}
}
});
-
- FBUtilities.waitOnFuture(f);
}
public static boolean isReadyForBootstrap()