RATIS-2421. Gracefully cancel stream after complete in GrpcLogAppender by symious · Pull Request #1363 · apache/ratis

What changes were proposed in this pull request?

When onCompleted() is called, the client waits for the server response to finish the RPC and release the underlying resources.

However, in some cases the server response may never arrive, which leaves the RPC stream open and prevents resources from being released.

This ticket introduces a client-side cancel() after a short grace period following onCompleted(), to ensure the RPC stream is forcefully closed and resources are cleaned up.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/RATIS-2421

How was this patch tested?

Test locally.