RATIS-2681. Add a gRPC peer data transfer listener - #1577
Open
HTHou wants to merge 1 commit into
Open
Conversation
HTHou
force-pushed
the
codex/RATIS-2681
branch
from
September 2, 2026 11:33
f54e9ac to
0c9ef3d
Compare
HTHou
force-pushed
the
codex/RATIS-2681
branch
from
September 2, 2026 12:06
0c9ef3d to
d7fea1b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Add an optional
Consumer<GrpcDataTransferEvent>for observing sender-side outcomes of gRPC peer data transfers.The listener reports:
RaftPeerIdTLSorNONE)SUCCESSorFAILURE)Events are emitted for
AppendEntriesrequests containing state machine entries and for logicalInstallSnapshottransfers. Heartbeats, configuration-only appends, and snapshot notification-only requests are excluded. Listener exceptions are isolated from the replication path, and the listener is documented as non-blocking.What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/RATIS-2681
How was this patch tested?
./mvnw -pl ratis-test -am -Dtest=TestGrpcDataTransferEventListener -DfailIfNoTests=false test./mvnw -pl ratis-grpc -am -DskipTests compile checkstyle:check./mvnw -pl ratis-grpc,ratis-test -am -DskipTests apache-rat:check./mvnw -pl ratis-grpc -am -DskipTests -Djacoco.skip test-compile spotbugs:checkThe tests cover plaintext and TLS append success, append failure and retry, listener exception isolation, one failure event per failed attempt, and successful snapshot transfer to a newly added peer.