[ 
https://issues.apache.org/jira/browse/RATIS-2402?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tsz-wo Sze resolved RATIS-2402.
-------------------------------
    Fix Version/s: 3.3.0
       Resolution: Fixed

The pull request was merged.  Thanks, [~slfan1989]!

> Fix CallId overflow when parsing gRPC metadata
> ----------------------------------------------
>
>                 Key: RATIS-2402
>                 URL: https://issues.apache.org/jira/browse/RATIS-2402
>             Project: Ratis
>          Issue Type: Bug
>          Components: gRPC
>            Reporter: Shilun Fan
>            Assignee: Shilun Fan
>            Priority: Major
>             Fix For: 3.3.0
>
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> 1.Problem
> The `GrpcUtil.getCallId()` method uses `Integer.parseInt()` to parse CallId 
> from gRPC metadata, which causes overflow when CallId exceeds 
> Integer.MAX_VALUE (2,147,483,647). This can result in incorrect CallId values 
> or NumberFormatException in high-throughput scenarios where CallId may grow 
> beyond 32-bit integer range.
>  
> ratis-proto/src/main/proto/Raft.proto:117 RaftRpcRequestProto.callId uint64
> atis-proto/src/main/proto/Raft.proto:90 callId uint64
>  
> 2.Solution
> Changed to use `Long.parseLong()` instead of `Integer.parseInt()` to support 
> CallId values beyond the 32-bit integer limit.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to