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/12/14 21:19:03 UTC

[GitHub] [geode] jchen21 commented on a change in pull request #7199: GEODE-9770: Retry creating region when cache is closed

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



##########
File path: geode-core/src/distributedTest/java/org/apache/geode/internal/cache/persistence/PersistentRecoveryOrderDUnitTest.java
##########
@@ -1327,8 +1327,19 @@ public void testRecoverAfterConflict() {
 
     vm0.invoke(() -> {
       // This should work now
-      createReplicateRegion(regionName, getDiskDirs(getVMId()));
-      updateEntry("A", "C");
+      try {
+        createReplicateRegion(regionName, getDiskDirs(getVMId()));
+        updateEntry("A", "C");
+      } catch (CacheClosedException cacheClosedException) {

Review comment:
       The question is how we can tell the cache is already closed or is in the process of closing, before recreating the region. There is some subtle difference. `GemFireCacheImpl.isClosed()` returns `true`, even when the bug occurs. So we can't depend on the flag `GemFireCacheImpl.isClosed()`. I have also tried to check if the cache is `null`. Not a good idea either. I probably have to do something similar to `cancelInProgress`.




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

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

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