[ 
https://issues.apache.org/jira/browse/KAFKA-17019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17949362#comment-17949362
 ] 

sanghyeok An commented on KAFKA-17019:
--------------------------------------

Hi, [~mjsax] !

I take a look into producer code to contribute this issue. 

 

There are only a few remaining code paths that still raise 
{{{}TimeoutException{}}}.
In most of them, the exception is thrown by the code itself while it is waiting 
for a {{{}ProducerBatch{}}}; in that case, the {{TimeoutException}} *is* the 
root cause, so it has nothing further to wrap or include.

The scenario you describe would occur if an exception were thrown while the 
{{ProducerBatch}} is executing and, as a result, 
{{ProducerRequestResult.done()}} is never called.
But in that case, hasn’t the {{ProducerBatch}} already raised the real 
exception, so nothing is actually “missing”?
Or do you think the exception raised inside {{ProducerBatch}} should instead be 
set as the root cause of the subsequent {{{}TimeoutException{}}}?

> Producer TimeoutException should include root cause
> ---------------------------------------------------
>
>                 Key: KAFKA-17019
>                 URL: https://issues.apache.org/jira/browse/KAFKA-17019
>             Project: Kafka
>          Issue Type: Improvement
>          Components: clients, producer 
>            Reporter: Matthias J. Sax
>            Priority: Major
>
> With KAFKA-16965 we added a "root cause" to some `TimeoutException` thrown by 
> the producer. However, it's only a partial solution to address a specific 
> issue.
> We should consider to add the "root cause" for _all_ `TimeoutException` cases 
> and unify/cleanup the code to get an holistic solution to the problem.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to