salmaloel657-dotcom commented on issue #10537:
URL: https://github.com/apache/rocketmq/issues/10537#issuecomment-4778289859

   I've reviewed the issue and the evaluation regarding the
   NettyRemotingAbstract improvements.
   
   The proposed changes to cache AttributesBuilder via getOrBuildAttributes()
   and transition to processTimerElapsedMs() make sense for optimizing the hot
   path and cleaning up deprecated calls. I agree that these enhancements are
   feasible with low compatibility risk.
   
   I will proceed with the suggested approach, ensuring that thread safety is
   maintained if the cached builder is shared across callback threads.
   
   
   On Mon, Jun 22, 2026, 5:03 AM RockteMQ-AI ***@***.***> wrote:
   
   > *RockteMQ-AI* left a comment (apache/rocketmq#10537)
   > <https://github.com/apache/rocketmq/issues/10537#issuecomment-4767117691>
   >
   > *Issue Evaluation*
   >
   > Category: type/enhancement | Status: *Evaluated*
   >
   > *Feasibility:* Feasible
   > *Scope:* remoting module (NettyRemotingAbstract)
   > *Compatibility:* Low risk — internal metrics path, no wire-format change.
   >
   > Both changes are valid:
   >
   >    1.
   >
   >    *AttributesBuilder caching*: Currently
   >    remotingMetricsManager.newAttributesBuilder() is called per RPC in
   >    invokeAsyncImpl (line ~240), invokeSyncImpl (line ~292), and
   >    processRequestCommand (line ~396). Caching via getOrBuildAttributes()
   >    would reduce per-request allocations on the hot path.
   >    2.
   >
   >    *processTimerElapsedMs()*:
   >    request.getProcessTimer().elapsed(TimeUnit.MILLISECONDS) is used in 3
   >    locations within NettyRemotingAbstract. Replacing with the
   >    non-deprecated processTimerElapsedMs() is a straightforward cleanup.
   >
   > *Suggested approach:*
   >
   >    - Add a lazy-initialized AttributesBuilder field or a
   >    getOrBuildAttributes() helper that reuses the builder across calls
   >    within the same RPC lifecycle.
   >    - Replace all getProcessTimer().elapsed(TimeUnit.MILLISECONDS) calls
   >    with processTimerElapsedMs().
   >    - Ensure thread safety if the cached builder is shared across callback
   >    threads.
   >
   > ------------------------------
   >
   > *Automated evaluation by RockteMQ-AI*
   >
   > —
   > Reply to this email directly, view it on GitHub
   > 
<https://github.com/apache/rocketmq/issues/10537?email_source=notifications&email_token=CABFFMNEZTNPLZY3DEPQ22D5BD767A5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINZWG4YTCNZWHEY2M4TFMFZW63VKON2WE43DOJUWEZLEUVSXMZLOOSWGM33PORSXEX3DNRUWG2Y#issuecomment-4767117691>,
   > or unsubscribe
   > 
<https://github.com/notifications/unsubscribe-auth/CABFFMJAYPH3B7JSCBHZV4D5BD767AVCNFSNUABEKJSXA33TNF2G64TZHM3TKMJWGQ4DEMZ3JFZXG5LFHM2DOMJVGQ4TSNBYGKQXMAQ>
   > .
   > Triage notifications, keep track of coding agent tasks and review pull
   > requests on the go with GitHub Mobile for iOS
   > 
<https://github.com/notifications/mobile/ios/CABFFMLXK4PGLM7NOJZYYE35BD767A5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINZWG4YTCNZWHEY2M4TFMFZW63VKON2WE43DOJUWEZLEUVSXMZLOOSVGM33PORSXEX3JN5ZQ>
   > and Android
   > 
<https://github.com/notifications/mobile/android/CABFFMNQUKI262GOIDPX7ZT5BD767A5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINZWG4YTCNZWHEY2M4TFMFZW63VKON2WE43DOJUWEZLEUVSXMZLOOSXGM33PORSXEX3BNZSHE33JMQ>.
   > Download it today!
   > You are receiving this because you are subscribed to this thread.Message
   > ID: ***@***.***>
   >
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to