agingade commented on a change in pull request #6827:
URL: https://github.com/apache/geode/pull/6827#discussion_r719862285
##########
File path:
geode-membership/src/main/java/org/apache/geode/distributed/internal/membership/gms/GMSMembership.java
##########
@@ -1797,19 +1815,9 @@ public void forceDisconnect(final String reason) {
}
if (this.isReconnectingDS()) {
- logger.info("Reconnecting system failed to connect");
- uncleanShutdown(reason,
- new MemberDisconnectedException("reconnecting system failed to
connect"));
- return;
- }
-
- try {
- listener.saveConfig();
- } finally {
- new LoggingThread("DisconnectThread", false, () -> {
- lifecycleListener.forcedDisconnect();
- uncleanShutdown(reason, shutdownCause);
- }).start();
+ uncleanShutdownReconnectingDS(reason, shutdownCause);
Review comment:
@Bill
The code earlier was:
@Override
public void forceDisconnect(final String reason) {
if (this.isReconnectingDS()) {
logger.info("Reconnecting system failed to connect");
uncleanShutdown(reason,
new MemberDisconnectedException("reconnecting system failed to
connect"));
return;
}
try {
listener.saveConfig();
} finally {
new LoggingThread("DisconnectThread", false, () -> {
lifecycleListener.forcedDisconnect();
uncleanShutdown(reason, shutdownCause);
}).start();
}
The idea is to call "listener.forcedDisconnectHappened(reason);" before the
"uncleanShutdown()" is called...
Along with that, we did refactoring to keep the "forceDisconnect()" to small
and testable. Separated out if() and else()...
We want to keep the code changes (logical) to minimum - calling
"listener.forcedDisconnectHappened(reason);" " where required.
--
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]