geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hiteshkhame...@apache.org
Subject [2/6] incubator-geode git commit: GEODE-1100 Neglect view when it send by member which is not in current view.
Date Fri, 18 Mar 2016 16:23:11 GMT
GEODE-1100 Neglect view when it send by member which is not in current view.

there is possibility that existing member can see view from non-existing
memebr in view. Thus now we just ignore that view, if member is not exist
in current view.


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

Branch: refs/heads/develop
Commit: f226f0108630e0330d993514da1342f226863f96
Parents: a8d6015
Author: Hitesh Khamesra <hkhamesra@pivotal.io>
Authored: Fri Mar 11 17:19:46 2016 -0800
Committer: Hitesh Khamesra <hkhamesra@pivotal.io>
Committed: Fri Mar 18 09:23:22 2016 -0700

----------------------------------------------------------------------
 .../internal/membership/gms/membership/GMSJoinLeave.java  | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f226f010/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
index 2b7893e..717a0ea 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
@@ -831,6 +831,11 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
   private void processViewMessage(final InstallViewMessage m) {
 
     NetView view = m.getView();
+    
+    if(currentView != null && !currentView.contains(m.getSender())) {
+      logger.info("Ignoring the view {} from member {}, which is not in my current view {}
", view, m.getSender(), currentView);
+      return;
+    }
 
     if (currentView != null && view.getViewId() < currentView.getViewId()) {
       // ignore old views
@@ -1445,9 +1450,12 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
       processRemoveRequest(msg);
       if (!this.isCoordinator) {
         msg.resetRecipients();
-        msg.setRecipients(v.getPreferredCoordinators(Collections.<InternalDistributedMember>emptySet(),
localAddress, 10));
+        msg.setRecipients(v.getPreferredCoordinators(Collections.<InternalDistributedMember>
emptySet(), localAddress, 10));
         services.getMessenger().send(msg);
       }
+    } else {
+      RemoveMemberMessage msg = new RemoveMemberMessage(m, m, reason);
+      services.getMessenger().send(msg);
     }
   }
 


Mime
View raw message