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 2013/06/19 23:31:17 UTC

[1/3] git commit: simplify initClient gossip loop patch by Adrian Nistor and jbellis for CASSANDRA-5662

Updated Branches:
  refs/heads/cassandra-1.2 fc5044f59 -> 9ba0ff03e
  refs/heads/trunk 78b0dbeb2 -> af008a41a


simplify initClient gossip loop
patch by Adrian Nistor and jbellis for CASSANDRA-5662


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

Branch: refs/heads/cassandra-1.2
Commit: 9ba0ff03e211554df6b01fd860159cc74bf95026
Parents: fc5044f
Author: Jonathan Ellis <jb...@apache.org>
Authored: Wed Jun 19 16:30:02 2013 -0500
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Wed Jun 19 16:30:08 2013 -0500

----------------------------------------------------------------------
 src/java/org/apache/cassandra/service/StorageService.java | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9ba0ff03/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 e73aa2e..34ecec8 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -395,16 +395,14 @@ public class StorageService extends NotificationBroadcasterSupport implements IE
         try
         {
             // sleep a while to allow gossip to warm up (the other nodes need to know about this one before they can reply).
-            boolean isUp = false;
-            while (!isUp)
+            outer:
+            while (true)
             {
                 Thread.sleep(1000);
                 for (InetAddress address : Gossiper.instance.getLiveMembers())
                 {
                     if (!Gossiper.instance.isFatClient(address))
-                    {
-                        isUp = true;
-                    }
+                        break outer;
                 }
             }
 


[2/3] git commit: simplify initClient gossip loop patch by Adrian Nistor and jbellis for CASSANDRA-5662

Posted by jb...@apache.org.
simplify initClient gossip loop
patch by Adrian Nistor and jbellis for CASSANDRA-5662


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

Branch: refs/heads/trunk
Commit: 9ba0ff03e211554df6b01fd860159cc74bf95026
Parents: fc5044f
Author: Jonathan Ellis <jb...@apache.org>
Authored: Wed Jun 19 16:30:02 2013 -0500
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Wed Jun 19 16:30:08 2013 -0500

----------------------------------------------------------------------
 src/java/org/apache/cassandra/service/StorageService.java | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9ba0ff03/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 e73aa2e..34ecec8 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -395,16 +395,14 @@ public class StorageService extends NotificationBroadcasterSupport implements IE
         try
         {
             // sleep a while to allow gossip to warm up (the other nodes need to know about this one before they can reply).
-            boolean isUp = false;
-            while (!isUp)
+            outer:
+            while (true)
             {
                 Thread.sleep(1000);
                 for (InetAddress address : Gossiper.instance.getLiveMembers())
                 {
                     if (!Gossiper.instance.isFatClient(address))
-                    {
-                        isUp = true;
-                    }
+                        break outer;
                 }
             }
 


[3/3] git commit: merge from 1.2

Posted by jb...@apache.org.
merge from 1.2


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

Branch: refs/heads/trunk
Commit: af008a41a50d8af3a0610333e0cd1ad73b247c62
Parents: 78b0dbe 9ba0ff0
Author: Jonathan Ellis <jb...@apache.org>
Authored: Wed Jun 19 16:31:14 2013 -0500
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Wed Jun 19 16:31:14 2013 -0500

----------------------------------------------------------------------
 .../org/apache/cassandra/service/StorageService.java   | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/af008a41/src/java/org/apache/cassandra/service/StorageService.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/service/StorageService.java
index 583f8da,34ecec8..f6becd0
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@@ -65,11 -63,9 +65,8 @@@ import org.apache.cassandra.gms.*
  import org.apache.cassandra.io.sstable.SSTableDeletingTask;
  import org.apache.cassandra.io.sstable.SSTableLoader;
  import org.apache.cassandra.io.util.FileUtils;
- import org.apache.cassandra.locator.AbstractReplicationStrategy;
- import org.apache.cassandra.locator.DynamicEndpointSnitch;
- import org.apache.cassandra.locator.IEndpointSnitch;
- import org.apache.cassandra.locator.TokenMetadata;
+ import org.apache.cassandra.locator.*;
 -import org.apache.cassandra.metrics.StorageMetrics;
 -import org.apache.cassandra.net.IAsyncResult;
 +import org.apache.cassandra.net.AsyncOneResponse;
  import org.apache.cassandra.net.MessageOut;
  import org.apache.cassandra.net.MessagingService;
  import org.apache.cassandra.net.ResponseVerbHandler;
@@@ -389,24 -392,29 +386,22 @@@ public class StorageService extends Not
          // We don't wait, because we're going to actually try to work on
          initClient(0);
  
 -        try
 +        // sleep a while to allow gossip to warm up (the other nodes need to know about this one before they can reply).
-         boolean isUp = false;
-         while (!isUp)
++        outer:
++        while (true)
          {
 -            // sleep a while to allow gossip to warm up (the other nodes need to know about this one before they can reply).
 -            outer:
 -            while (true)
 +            Uninterruptibles.sleepUninterruptibly(1, TimeUnit.SECONDS);
 +            for (InetAddress address : Gossiper.instance.getLiveMembers())
              {
 -                Thread.sleep(1000);
 -                for (InetAddress address : Gossiper.instance.getLiveMembers())
 -                {
 -                    if (!Gossiper.instance.isFatClient(address))
 -                        break outer;
 -                }
 -            }
 -
 -            // sleep until any schema migrations have finished
 -            while (!MigrationManager.isReadyForBootstrap())
 -            {
 -                Thread.sleep(1000);
 +                if (!Gossiper.instance.isFatClient(address))
-                 {
-                     isUp = true;
-                 }
++                    break outer;
              }
          }
 -        catch (InterruptedException e)
 +
 +        // sleep until any schema migrations have finished
 +        while (!MigrationManager.isReadyForBootstrap())
          {
 -            throw new AssertionError(e);
 +            Uninterruptibles.sleepUninterruptibly(1, TimeUnit.SECONDS);
          }
      }