Skip to content

RATIS-2694. Log last gRPC stream reply in GrpcServerProtocolService completion message - #1588

Open
jojochuang wants to merge 1 commit into
apache:masterfrom
jojochuang:RATIS-2694
Open

jojochuang wants to merge 1 commit into
apache:masterfrom
jojochuang:RATIS-2694

Conversation

@jojochuang

Copy link
Copy Markdown
Contributor

Summary

  • For ordered gRPC Raft RPCs (ServerRequestStreamObserver with replyInOrder == true, including INSTALL_SNAPSHOT), each reply is sent on the stream in onNext, but the internal CompletableFuture chain completes with null.
  • onCompleted logged ProtoUtils.shortDebugString(reply) and therefore always showed lastReply: null, which is misleading during snapshot catch-up.
  • Record the last reply sent on the stream and log it with replyToString on stream completion (fallback to the future value for unordered requests, or none).

Jira

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

Test plan

  • mvn -pl ratis-grpc -am test -DskipTests
  • Manual: SCM/OM HA follower install snapshot — Completed INSTALL_SNAPSHOT, lastReply: should match the last reply installSnapshot: line from SnapshotInstallationHandler

Made with Cursor

…ompletion message

Ordered ServerRequestStreamObserver requests (including INSTALL_SNAPSHOT)
send each reply on the stream but complete the internal future with null.
Record the last reply sent on the stream and log it via replyToString on
stream completion instead of ProtoUtils.shortDebugString(null).

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant