dschneider-pivotal commented on a change in pull request #6093:
URL: https://github.com/apache/geode/pull/6093#discussion_r594566393



##########
File path: 
geode-core/src/main/java/org/apache/geode/internal/cache/persistence/PersistenceAdvisorImpl.java
##########
@@ -552,6 +555,10 @@ public boolean 
checkMyStateOnMembers(Set<InternalDistributedMember> replicates)
         }
       }
     }
+    if (replicates.isEmpty() && splitBrainHappened) {
+      throw new ConflictingPersistentDataException(String
+          .format("Region %s from %s is split-brained from all other 
members.", regionPath, myId));

Review comment:
       I think "is split-brained" needs to be improved. Base this message on 
the info one you have above. How about: "Region %s from %s was not part of the 
same distributed system as the existing online members"
   

##########
File path: 
geode-core/src/main/java/org/apache/geode/internal/cache/persistence/PersistenceAdvisorImpl.java
##########
@@ -552,6 +555,10 @@ public boolean 
checkMyStateOnMembers(Set<InternalDistributedMember> replicates)
         }
       }
     }
+    if (replicates.isEmpty() && splitBrainHappened) {

Review comment:
       The only way replicates can become empty is by the remove done on line 
539. So I would move this test up to be right after you call 
replicates.remove(). This allows you to get rid of the new splitBrainHappened 
variable. And instead of creating a new message for the exception  I think you 
should just use the old message. So the only change is we are only going to 
throw the old exception if no other online replicate knows about us.




----------------------------------------------------------------
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:
[email protected]


Reply via email to