DonalEvans commented on a change in pull request #6964:
URL: https://github.com/apache/geode/pull/6964#discussion_r725405708
##########
File path:
geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
##########
@@ -5571,6 +5583,9 @@ public void cleanupFailedInitialization() {
logger.warn(
"PartitionedRegion#cleanupFailedInitialization(): Failed to clean
the PartionRegion data store",
ex);
+ if (savedFirstRuntimeException == null && ex instanceof
RuntimeException) {
Review comment:
`ex instanceof RuntimeException` should always evaluate to true here,
since `dataStore.cleanUp()` doesn't throw any checked exceptions, only
`RuntimeException`.
##########
File path:
geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
##########
@@ -5592,6 +5607,9 @@ public void cleanupFailedInitialization() {
logger.warn(
"PartitionedRegion#cleanupFailedInitialization: Failed to clean
the PartionRegion allPartitionedRegions",
ex);
+ if (savedFirstRuntimeException == null && ex instanceof
RuntimeException) {
Review comment:
`ex instanceof RuntimeException` should always be true here too, I think.
##########
File path:
geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
##########
@@ -5557,12 +5565,16 @@ public void cleanupFailedInitialization() {
int serials[] = getRegionAdvisor().getBucketSerials();
RegionEventImpl event = new RegionEventImpl(this, Operation.REGION_CLOSE,
null, false,
getMyId(), generateEventID()/* generate EventID */);
+ RuntimeException savedFirstRuntimeException = null;
try {
sendDestroyRegionMessage(event, serials);
} catch (Exception ex) {
logger.warn(
"PartitionedRegion#cleanupFailedInitialization(): Failed to clean
the PartionRegion data store",
ex);
+ if (savedFirstRuntimeException == null && ex instanceof
RuntimeException) {
Review comment:
This if statement always evaluates to `true`, since
`savedFirstRuntimeException` is always null here, and `ex` must be a
`RuntimeException` since `sendDestroyRegionMessage()` does not throw any
checked exceptions.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]