Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Skipping reconnect when not in cluster anymore.

This changeset skips the reconnect phase when the to be
reconnected node is not part of the cluster anymore. This
information is based on the locator.

Change-Id: I949ec1e78fd6b5fa73851d5461cbf3a70de11027
Reviewed-on: http://review.couchbase.org/24232
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
  • Loading branch information...
commit 6e8c47d38c178cf6e3d763c625ed0be08102e246 1 parent 65cf4b0
Michael Nitschinger authored January 28, 2013 daschl committed February 01, 2013
5  src/main/java/net/spy/memcached/MemcachedConnection.java
@@ -658,6 +658,11 @@ private void attemptReconnects() throws IOException {
658 658
       final MemcachedNode qa = i.next();
659 659
       i.remove();
660 660
       try {
  661
+        if(!belongsToCluster(qa)) {
  662
+          getLogger().debug("Node does not belong to cluster anymore, "
  663
+            + "skipping reconnect: %s", qa);
  664
+          continue;
  665
+        }
661 666
         if (!seen.containsKey(qa)) {
662 667
           seen.put(qa, Boolean.TRUE);
663 668
           getLogger().info("Reconnecting %s", qa);

0 notes on commit 6e8c47d

Please sign in to comment.
Something went wrong with that request. Please try again.