[ https://issues.apache.org/jira/browse/KAFKA-6127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17194565#comment-17194565 ]
Sophie Blee-Goldman edited comment on KAFKA-6127 at 9/11/20, 11:47 PM: ----------------------------------------------------------------------- [~guozhang] [~vvcephei] any thoughts on this? You probably touched on a lot of these calls back in "The Refactor" – I remember seeing that we started to catch TimeoutException in the Consumer#position call, for example. I know there are some related issues with infinite blocking in exceptional cases, for example when a topic is deleted out from under a Producer, but we already have a separate ticket for that. If that sort of thing is the only one remaining we should maybe close this as a duplicate instead was (Author: ableegoldman): [~guozhang] any thoughts on this? You probably touched on a lot of these calls back in "The Refactor" – I remember seeing that we started to catch TimeoutException in the Consumer#position call, for example. I know there are some related issues with infinite blocking in exceptional cases, for example when a topic is deleted out from under a Producer, but we already have a separate ticket for that. If that sort of thing is the only one remaining we should maybe close this as a duplicate instead > Streams should never block infinitely > ------------------------------------- > > Key: KAFKA-6127 > URL: https://issues.apache.org/jira/browse/KAFKA-6127 > Project: Kafka > Issue Type: Bug > Components: streams > Affects Versions: 1.0.0 > Reporter: Matthias J. Sax > Priority: Major > Labels: exactly-once > > Streams uses three consumer APIs that can block infinite: {{commitSync()}}, > {{committed()}}, and {{position()}}. Also {{KafkaProducer#send()}} can block. > If EOS is enabled, {{KafkaProducer#initTransactions()}} also used to block > (fixed in KAFKA-6446) and we should double check the code if we handle this > case correctly. > If we block within one operation, the whole {{StreamThread}} would block, and > the instance does not make any progress, becomes unresponsive (for example, > {{KafkaStreams#close()}} suffers), and we also might drop out of the consumer > group. > Thanks to > [KIP-266|[https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=75974886],] > the Consumer now has non-blocking variants that we can use, but the same is > not true of Producer. We can add non-blocking variants to Producer as well, > or set the appropriate config options to set the max timeout. > Of course, we'd also need to be sure the catch the appropriate timeout > exceptions. -- This message was sent by Atlassian Jira (v8.3.4#803005)