guozhangwang opened a new pull request, #12102:
URL: https://github.com/apache/kafka/pull/12102

   We added the metadata wait time in total blocked time 
(https://github.com/apache/kafka/pull/11805). But we added it in the critical 
path of `send` which is called per-record, whereas metadata refresh only 
happens rarely. This way the cost of `time.nanos` becomes unnecessarily 
significant as we call it twice per record.
   
   This PR moves the call to inside the `waitOnMetadata` callee and only when 
we do need to wait for a metadata refresh round-trip (i.e. we are indeed 
blocking).
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


-- 
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