You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2021/02/01 17:10:07 UTC

[GitHub] [geode] kamilla1201 opened a new pull request #5984: GEODE-8901: Add checkIfMemberInFinalCheck arg to checkIfAvailable

kamilla1201 opened a new pull request #5984:
URL: https://github.com/apache/geode/pull/5984


   Thank you for submitting a contribution to Apache Geode.
   
   In order to streamline the review of the contribution we ask you
   to ensure the following steps have been taken:
   
   ### For all changes:
   - [ ] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?
   
   - [ ] Has your PR been rebased against the latest commit within the target branch (typically `develop`)?
   
   - [ ] Is your initial contribution a single, squashed commit?
   
   - [ ] Does `gradlew build` run cleanly?
   
   - [ ] Have you written or updated unit tests to verify your changes?
   
   - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
   
   ### Note:
   Please ensure that once the PR is submitted, check Concourse for build issues and
   submit an update to your PR as soon as possible. If you need help, please send an
   email to dev@geode.apache.org.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] Bill commented on a change in pull request #5984: GEODE-8901: Surviving side server forcefully disconnected after network drop

Posted by GitBox <gi...@apache.org>.
Bill commented on a change in pull request #5984:
URL: https://github.com/apache/geode/pull/5984#discussion_r571217658



##########
File path: geode-membership/src/integrationTest/java/org/apache/geode/distributed/internal/membership/gms/fd/GMSHealthMonitorJUnitTest.java
##########
@@ -656,6 +656,50 @@ public void testFinalCheckInProgressPreemptsLivenessGossip() throws Exception {
     assertThat(testMonitor.getContactTimestamp(memberToCheck)).isEqualTo(timestamp);
   }
 
+  @Test
+  public void testMemberIsAvailableWhenInFinalCheck() throws Exception {
+    useGMSHealthMonitorTestClass = true;
+    simulateHeartbeatInGMSHealthMonitorTestClass = false;
+
+    GMSMembershipView v = installAView();

Review comment:
       can this be `final`? You can configure IJ to highlight these for you.

##########
File path: geode-membership/src/main/java/org/apache/geode/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
##########
@@ -670,7 +670,13 @@ public void suspect(ID mbr, String reason) {
   @Override
   public boolean checkIfAvailable(ID mbr, String reason,
       boolean initiateRemoval) {
-    if (membersInFinalCheck.contains(mbr)) {
+    return checkIfAvailable(mbr, reason, initiateRemoval, true);
+  }
+
+  @Override
+  public boolean checkIfAvailable(ID mbr, String reason,
+      boolean initiateRemoval, boolean checkIfMemberInFinalCheck) {

Review comment:
       suggest renaming parameter `checkIfMemberInFinalCheck` to `assumeMembersInFinalCheckAreAvailable` since the latter makes more sense to callers who haven't read the internals of the method

##########
File path: geode-membership/src/main/java/org/apache/geode/distributed/internal/membership/gms/membership/GMSJoinLeave.java
##########
@@ -1454,10 +1454,14 @@ void processMessage(NetworkPartitionMessage<ID> msg) {
     if (isStopping) {
       return;
     }
-
-    String str = "Membership coordinator " + msg.getSender()
-        + " has declared that a network partition has occurred";
-    forceDisconnect(str);
+    ID sender = msg.getSender();
+    if (getView().getMembers().contains(sender)) {
+      String str = "Membership coordinator " + msg.getSender()
+          + " has declared that a network partition has occurred";
+      forceDisconnect(str);
+    } else {
+      logger.warn("Ignoring the network partition message from a non-member: " + msg.getSender());
+    }

Review comment:
       Should we be honoring messages from surprise members too @bschuchardt ?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] bschuchardt commented on a change in pull request #5984: GEODE-8901: Surviving side server forcefully disconnected after network drop

Posted by GitBox <gi...@apache.org>.
bschuchardt commented on a change in pull request #5984:
URL: https://github.com/apache/geode/pull/5984#discussion_r569626758



##########
File path: geode-membership/src/main/java/org/apache/geode/distributed/internal/membership/gms/membership/GMSJoinLeave.java
##########
@@ -1454,10 +1454,14 @@ void processMessage(NetworkPartitionMessage<ID> msg) {
     if (isStopping) {
       return;
     }
-
-    String str = "Membership coordinator " + msg.getSender()
-        + " has declared that a network partition has occurred";
-    forceDisconnect(str);
+    ID sender = msg.getSender();
+    if (getView().getMembers().contains(sender) || getView().getViewId() == sender.getVmViewId()) {

Review comment:
       I don't understand the reason for the viewId check you've added here.  Would you please elaborate?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] kamilla1201 commented on a change in pull request #5984: GEODE-8901: Surviving side server forcefully disconnected after network drop

Posted by GitBox <gi...@apache.org>.
kamilla1201 commented on a change in pull request #5984:
URL: https://github.com/apache/geode/pull/5984#discussion_r569651809



##########
File path: geode-membership/src/main/java/org/apache/geode/distributed/internal/membership/gms/membership/GMSJoinLeave.java
##########
@@ -1454,10 +1454,14 @@ void processMessage(NetworkPartitionMessage<ID> msg) {
     if (isStopping) {
       return;
     }
-
-    String str = "Membership coordinator " + msg.getSender()
-        + " has declared that a network partition has occurred";
-    forceDisconnect(str);
+    ID sender = msg.getSender();
+    if (getView().getMembers().contains(sender) || getView().getViewId() == sender.getVmViewId()) {

Review comment:
       Thanks for pointing this out, @bschuchardt. I removed the check.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] Bill merged pull request #5984: GEODE-8901: Surviving side server forcefully disconnected after network drop

Posted by GitBox <gi...@apache.org>.
Bill merged pull request #5984:
URL: https://github.com/apache/geode/pull/5984


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org