You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by zh...@apache.org on 2021/03/31 17:16:32 UTC

[geode] branch feature/GEODE-9003 created (now fb55d3d)

This is an automated email from the ASF dual-hosted git repository.

zhouxj pushed a change to branch feature/GEODE-9003
in repository https://gitbox.apache.org/repos/asf/geode.git.


      at fb55d3d  Revert "GEODE-9003: Remove the member from replicates as GII candidate if it'… (#6093)"

This branch includes the following new commits:

     new fb55d3d  Revert "GEODE-9003: Remove the member from replicates as GII candidate if it'… (#6093)"

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[geode] 01/01: Revert "GEODE-9003: Remove the member from replicates as GII candidate if it'… (#6093)"

Posted by zh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zhouxj pushed a commit to branch feature/GEODE-9003
in repository https://gitbox.apache.org/repos/asf/geode.git

commit fb55d3dcfc3fc7850bec7da7eb6f52955f200ce4
Author: zhouxh <gz...@pivotal.io>
AuthorDate: Wed Mar 31 10:14:16 2021 -0700

    Revert "GEODE-9003: Remove the member from replicates as GII candidate if it'… (#6093)"
    
    This reverts commit 1fb1dc186cb2aeaa97606a8fe9488128bac2f808.
    
    revert it to apply a better fix.
---
 .../PersistentRecoveryOrderDUnitTest.java          | 32 ----------------------
 .../cache/persistence/PersistenceAdvisorImpl.java  | 11 ++------
 2 files changed, 3 insertions(+), 40 deletions(-)

diff --git a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/persistence/PersistentRecoveryOrderDUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/persistence/PersistentRecoveryOrderDUnitTest.java
index d1cd737..1270e89 100644
--- a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/persistence/PersistentRecoveryOrderDUnitTest.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/persistence/PersistentRecoveryOrderDUnitTest.java
@@ -877,42 +877,10 @@ public class PersistentRecoveryOrderDUnitTest extends CacheTestCase {
           createReplicateRegion(regionName, getDiskDirs(getVMId()));
         });
         assertThat(thrown).isInstanceOf(ConflictingPersistentDataException.class);
-        assertThat(thrown.getMessage())
-            .contains("was not part of the same distributed system as the local data");
       }
     });
   }
 
-  @Test
-  public void testRecoverableSplitBrain() {
-    vm2.invoke(() -> {
-      createReplicateRegion(regionName, getDiskDirs(getVMId()));
-    });
-    vm0.invoke(() -> {
-      createReplicateRegion(regionName, getDiskDirs(getVMId()));
-      putEntry("A", "B");
-      getCache().getRegion(regionName).close();
-    });
-
-    vm1.invoke(() -> {
-      createReplicateRegion(regionName, getDiskDirs(getVMId()));
-      validateEntry("A", "B");
-      updateEntry("A", "C");
-      getCache().getRegion(regionName).close();
-    });
-
-    // VM0 doesn't know that VM1 ever existed so it will start up.
-    vm0.invoke(() -> {
-      createReplicateRegion(regionName, getDiskDirs(getVMId()));
-      validateEntry("A", "C");
-    });
-
-    vm1.invoke(() -> {
-      createReplicateRegion(regionName, getDiskDirs(getVMId()));
-      validateEntry("A", "C");
-    });
-  }
-
   /**
    * Test to make sure that if if a member crashes while a GII is in progress, we wait for the
    * member to come back for starting.
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/PersistenceAdvisorImpl.java b/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/PersistenceAdvisorImpl.java
index 7432265..11f2563 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/PersistenceAdvisorImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/PersistenceAdvisorImpl.java
@@ -514,14 +514,14 @@ public class PersistenceAdvisorImpl implements InternalPersistenceAdvisor {
     persistenceAdvisorObserver.observe(regionPath);
 
     boolean equal = false;
-    PersistentMemberID myId = getPersistentID();
     for (Map.Entry<InternalDistributedMember, PersistentMemberState> entry : remoteStates
         .getStateOnPeers().entrySet()) {
       InternalDistributedMember member = entry.getKey();
       PersistentMemberID remoteId = remoteStates.getPersistentIds().get(member);
 
-
+      PersistentMemberID myId = getPersistentID();
       PersistentMemberState stateOnPeer = entry.getValue();
+
       if (PersistentMemberState.REVOKED.equals(stateOnPeer)) {
         throw new RevokedPersistentDataException(
             String.format(
@@ -533,12 +533,7 @@ public class PersistenceAdvisorImpl implements InternalPersistenceAdvisor {
         String message = String.format(
             "Region %s remote member %s with persistent data %s was not part of the same distributed system as the local data from %s",
             regionPath, member, remoteId, myId);
-        replicates.remove(member);
-        if (replicates.isEmpty()) {
-          throw new ConflictingPersistentDataException(message);
-        } else {
-          logger.info(message);
-        }
+        throw new ConflictingPersistentDataException(message);
       }
 
       if (myId != null && stateOnPeer == PersistentMemberState.EQUAL) {