szetszwo commented on code in PR #1647:
URL: https://github.com/apache/ratis/pull/1647#discussion_r4351337861
##########
ratis-server/src/main/java/org/apache/ratis/server/impl/RaftServerImpl.java:
##########
@@ -604,14 +613,14 @@ private void closeImpl(Throwable cause) {
failure = e;
throw e;
} finally {
- completeClose(failure);
+ completeClose(failure, allServers);
}
}
- private void completeClose(Throwable cause) {
+ private void completeClose(Throwable cause, boolean allServers) {
lifeCycle.transitionIfNotEqual(State.CLOSED);
if (cause == null) {
- closeFuture.complete(null);
+ closeFuture.complete(allServers);
} else {
closeFuture.completeExceptionally(cause);
}
Review Comment:
@amaliujia , For completeExceptionally(..), we will lose the allServers
information. How about calling
complete(allServers) even for exceptions? The exception information
currently is unused.
--
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]