szetszwo commented on code in PR #1647:
URL: https://github.com/apache/ratis/pull/1647#discussion_r4351287179
##########
ratis-server/src/main/java/org/apache/ratis/server/impl/RaftServerImpl.java:
##########
@@ -299,10 +300,12 @@ public long[] getFollowerMatchIndices() {
id + "-client");
this.threadGroup = new ThreadGroup(proxy.getThreadGroup(),
getMemberId().toString());
- this.closeFuture.whenComplete((v, e) -> {
+ this.closeFuture.whenComplete((allServers, e) -> {
// A division closed before its role is initialized has no role info to
report.
if (role.getCurrentRole() != null) {
- stateMachine.event().notifyServerShutdown(getRoleInfoProto(), false);
+ // allServers is null when the close has failed.
Review Comment:
The current code in some cases simply call close() but not close(cause) when
there is an exception. If we add EventStatus.FAILED, we should also fix these
cases.
It seems to me that it does not worth the effort for now. If we really want
to do it, we can change it in a separated JIRA.
--
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]