You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by bs...@apache.org on 2016/12/19 17:51:31 UTC

[5/5] geode git commit: GEODE-2213 Deadlock in GMSJoinLeaveJUnitTest

GEODE-2213 Deadlock in GMSJoinLeaveJUnitTest

This removes the informToPendingJoinRequests invocation in recordViewRequest.
I was already testing this change as I suspected that this invocation was
causing new members to timeout trying to connect to the distributed system
due to informToPendingJoinRequests removing join requests from the view
creator's queue.


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

Branch: refs/heads/develop
Commit: b5356d65a04a20c3ac6dc309c89580ba9d1c7aec
Parents: 5dfce1b
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Mon Dec 19 09:45:28 2016 -0800
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Mon Dec 19 09:50:53 2016 -0800

----------------------------------------------------------------------
 .../internal/membership/gms/membership/GMSJoinLeave.java    | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/b5356d65/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/gms/membership/GMSJoinLeave.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/gms/membership/GMSJoinLeave.java b/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/gms/membership/GMSJoinLeave.java
index 4ee3011..7da9de4 100644
--- a/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/gms/membership/GMSJoinLeave.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/gms/membership/GMSJoinLeave.java
@@ -675,10 +675,8 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
     logger.debug("Recording the request to be processed in the next membership view");
     synchronized (viewRequests) {
       viewRequests.add(request);
-      if (viewCreator != null) {
-        boolean joinResponseSent = viewCreator.informToPendingJoinRequests();
-
-        if (!joinResponseSent && request instanceof JoinRequestMessage) {
+      if (viewCreator != null && services.getMessenger().getClusterSecretKey() != null) {
+        if (request instanceof JoinRequestMessage) {
           JoinRequestMessage jreq = (JoinRequestMessage) request;
           // this will inform about cluster-secret key, as we have authenticated at this point
           JoinResponseMessage response = new JoinResponseMessage(jreq.getSender(),
@@ -2159,9 +2157,6 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
           switch (msg.getDSFID()) {
             case JOIN_REQUEST:
               requests.add((JoinRequestMessage) msg);
-              // TODO [bruce] if the view creator is just spinning up I don't think we should do
-              // this remove
-              iterator.remove();
               break;
             default:
               break;