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/03/11 23:36:12 UTC

[GitHub] [geode] jchen21 commented on a change in pull request #6093: GEODE-9003: Remove the member from replicates as GII candidate if it'…

jchen21 commented on a change in pull request #6093:
URL: https://github.com/apache/geode/pull/6093#discussion_r592797177



##########
File path: geode-core/src/distributedTest/java/org/apache/geode/internal/cache/persistence/PersistentRecoveryOrderDUnitTest.java
##########
@@ -881,6 +881,32 @@ public void testSplitBrain() {
     });
   }
 
+  @Test
+  public void testRecoverableSplitBrain() {

Review comment:
       I am afraid this test does not cover the code change you have in `PersistenceAdvisorImpl`.  I don't see the log message of line 537 in `PersistenceAdvisorImpl` in the test run. Nor did I see `ConflictingPersistentDataException` in the test run. In the test, `vm2` is always online. Perhaps this is not a scenario of split brain that you expect. Maybe I am missing something. 

##########
File path: geode-core/src/distributedTest/java/org/apache/geode/internal/cache/persistence/PersistentRecoveryOrderDUnitTest.java
##########
@@ -881,6 +881,32 @@ public void testSplitBrain() {
     });
   }
 
+  @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()));
+      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())));

Review comment:
       Can we also do `validateEntry("A", "C");` on `vm0`?




----------------------------------------------------------------
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