MINOR: Only update a request's local complete time in API handler if unset.#7813
Conversation
There was a problem hiding this comment.
This actually seems like an intuitive time to set the local complete time. I guess the reason we set it in RequestChannel.Response also is that we are trying to set it consistently with responseCompleteTimeNanos. I can't really think of a better solution than what you have here, but it might at least be helpful to add a comment of explanation?
There was a problem hiding this comment.
I was looking at this code and the way it works today is super confusing. :) I think this change makes sense. However, I was curious how you noticed this. Was there a delay in getting to this point somehow? In theory, the value at this point should be very similar to the value we set during processing.
There was a problem hiding this comment.
From what I remember, the value was close enough that I didn't consider it worth looking into. I encountered it when I added debug metrics to further subdivide the local time, and there appeared to be lost time, i.e. the sum wasn't adding to the whole.
|
It's also updated from the ClientRequestQuotaManager when determining the throttle time. I added a general comment stating the somewhat-obvious that it's possible for it to be set during processing, but in the end, I don't think it's a big deal. I only noticed it when doing some profiling and finding some numbers were off in the calculations. |
|
retest this please |
* apache-github/trunk: KAFKA-9418; Add new sendOffsetsToTransaction API to KafkaProducer (apache#7952) KAFKA-7273 Clarification on mutability of headers passed to Converter#fromConnectData() (apache#7489) MINOR: Only update a request's local complete time in API handler if unset (apache#7813) KAFKA-9143: Log task reconfiguration error only when it happened (apache#7648) MINOR: Change the log level from ERROR to DEBUG when failing to get plugin loader for connector (apache#7964) KAFKA-9024: Better error message when field specified does not exist (apache#7819) KAFKA-7204: Avoid clearing records for paused partitions on poll of MockConsumer (apache#7505) KAFKA-9083: Various fixes/improvements for Connect's Values class (apache#7593) MINOR: log error message from Connect sink exception (apache#7555)
Committer Checklist (excluded from commit message)