RATIS-2486. Add detailed zero-copy metrics for gRPC message types and fallback tracking. by slfan1989 · Pull Request #1417 · apache/ratis
What changes were proposed in this pull request?
This PR enhances ZeroCopyMetrics with detailed observability for gRPC zero-copy message processing:
- Per-message-type counters: Added separate metrics to track zero-copy usage for AppendEntries, InstallSnapshot, and ClientRequest messages
- Performance metrics: Added
bytes_saved_by_zero_copyandzero_copy_parse_time_nanosto quantify zero-copy benefits - Fallback diagnostics: Added counters for each fallback reason (
not_known_length,not_detachable,not_byte_buffer) to help diagnose zero-copy compatibility issues - InstallSnapshot support: Extended zero-copy marshalling to InstallSnapshot requests in GrpcServerProtocolService
What is the link to the Apache JIRA
RATIS-2486. Add detailed zero-copy metrics for gRPC message types and fallback tracking.
How was this patch tested?
- Existing unit tests pass