yandrey321 commented on code in PR #1679:
URL: https://github.com/apache/ratis/pull/1679#discussion_r4471940802
##########
ratis-grpc/src/main/java/org/apache/ratis/grpc/server/GrpcLogAppender.java:
##########
@@ -357,7 +360,13 @@ private void sleepForErrors() throws InterruptedException {
@Override
public CompletableFuture<LifeCycle.State> stopAsync() {
grpcServerMetrics.unregister();
- return super.stopAsync();
+ return super.stopAsync().whenComplete((state, e) -> {
+ // when CLOSED, no more appendEntries for this group to the follower;
otherwise, a restarted appender takes over
+ final GrpcServerProtocolClient client = appendEntriesClient;
+ if (state == LifeCycle.State.CLOSED && client != null) {
+
client.releaseAppendEntriesIndex(getServer().getMemberId().getGroupId());
Review Comment:
Please check the simplified round robin implementation. Benchmark numbers
does not move much between all 3 suggested implementations
--
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]