squah-confluent opened a new pull request, #24232: URL: https://github.com/apache/kafka/pull/24232
Requests bound for the group coordinator are processed on coordinator threads after KafkaApis.handle returns, so that processing time counts towards RemoteTimeMs instead of LocalTimeMs. To allow such components to record local time, track local time as a set of spans that may overlap and may begin and end on different threads, instead of as a single local completion time plus callback times. Add a RequestTimeRecorder interface for beginning and ending local time spans. Request implements it by tracking the union of active spans in a single atomic long. The request handler records spans around request handling, callbacks and forwarded requests, replacing apiLocalCompleteTimeNanos and the callback timestamps. Request also takes a Time instead of reading Time.SYSTEM, so that all request times come from the same clock. Local time is unchanged, except that overlapping request handling and callback time is no longer counted twice, and the request quota now also counts callback time. Co-Authored-By: Claude Opus 5.5 <[email protected]> -- 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]
