[
https://issues.apache.org/jira/browse/KAFKA-16937?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17854252#comment-17854252
]
Chia-Ping Tsai commented on KAFKA-16937:
----------------------------------------
Maybe we should study the history of that method. If the pattern can be applied
to code base, we should keep it and have more usage. Or we can refactor it if
it is rare case now.
> Consider inlineing Time#waitObject to ProducerMetadata#awaitUpdate
> ------------------------------------------------------------------
>
> Key: KAFKA-16937
> URL: https://issues.apache.org/jira/browse/KAFKA-16937
> Project: Kafka
> Issue Type: Improvement
> Reporter: Chia-Ping Tsai
> Assignee: PoAn Yang
> Priority: Minor
>
> Time#waitObject is implemented by while-loop and it is used by
> `ProducerMetadata` only. Hence, this jira can include following changes:
> 1. move `Time#waitObject` to `ProducerMetadata#awaitUpdate`
> 2. ProducerMetadata#awaitUpdate can throw "exact" TimeoutException [0]
> [0]
> https://github.com/apache/kafka/blob/23fe71d579f84d59ebfe6d5a29e688315cec1285/clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java#L1176
--
This message was sent by Atlassian Jira
(v8.20.10#820010)