You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "Shilun Fan (Jira)" <ji...@apache.org> on 2026/02/08 00:54:00 UTC
[jira] [Created] (RATIS-2402) Fix CallId overflow when parsing gRPC metadata
Shilun Fan created RATIS-2402:
---------------------------------
Summary: Fix CallId overflow when parsing gRPC metadata
Key: RATIS-2402
URL: https://issues.apache.org/jira/browse/RATIS-2402
Project: Ratis
Issue Type: Bug
Reporter: Shilun Fan
Assignee: Shilun Fan
### 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
### 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)