Before Creating the Bug Report
Runtime platform environment
All
RocketMQ version
5.x
JDK Version
All
Describe the Bug
In Local Proxy mode, LocalRemotingCommand does not initialize processTimer because the request does not pass through NettyDecoder.
This causes a NullPointerException in the ChannelFutureListener of NettyRemotingAbstract.writeResponse when recording the RPC latency.
Steps to Reproduce
- Start RocketMQ Proxy in Local mode.
- Send a message through the gRPC endpoint.
- Inspect
NettyRemotingAbstract.writeResponse when the response is written.
- Observe that
request.getProcessTimer() is null.
What Did You Expect to See?
The local request should have an initialized process timer, and the RPC latency metric should be recorded successfully.
What Did You See Instead?
A NullPointerException occurs when calling request.getProcessTimer().elapsed(...).
Additional Context
No response
Before Creating the Bug Report
I found a bug, not just asking a question, which should be created in GitHub Discussions.
I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.
I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.
Runtime platform environment
All
RocketMQ version
5.x
JDK Version
All
Describe the Bug
In Local Proxy mode,
LocalRemotingCommanddoes not initializeprocessTimerbecause the request does not pass throughNettyDecoder.This causes a
NullPointerExceptionin theChannelFutureListenerofNettyRemotingAbstract.writeResponsewhen recording the RPC latency.Steps to Reproduce
NettyRemotingAbstract.writeResponsewhen the response is written.request.getProcessTimer()isnull.What Did You Expect to See?
The local request should have an initialized process timer, and the RPC latency metric should be recorded successfully.
What Did You See Instead?
A
NullPointerExceptionoccurs when callingrequest.getProcessTimer().elapsed(...).Additional Context
No response