slfan1989 commented on code in PR #1577:
URL: https://github.com/apache/ratis/pull/1577#discussion_r3942692660
##########
ratis-grpc/src/main/java/org/apache/ratis/grpc/server/GrpcLogAppender.java:
##########
Review Comment:
I have one concern about `AppendLogResponseHandler.onError()`.
When the log appender is no longer running, the method returns before
clearing and reporting the pending requests:
```
if (!isRunning()) {
return;
}
```
If a shutdown or leader transition races with a gRPC stream error, some
already-sent data-bearing requests may never receive a terminal `FAILURE` event.
This seems inconsistent with the requirement that every transfer attempt
should generate exactly one terminal event. The snapshot error path already
reports the failure before checking `isRunning()`.
Could we report the affected sent requests as failures before returning,
without updating the Raft replication state?
It would also be helpful to add a regression test covering a stream failure
with multiple pending data-bearing requests.
--
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]