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

ASF GitHub Bot commented on KAFKA-7763:
---------------------------------------

huxihx commented on pull request #6066: KAFKA-7763: commitTransaction and 
abortTransaction should not wait endless when brokers are down
URL: https://github.com/apache/kafka/pull/6066
 
 
   Currently, commitTransaction and abortTransaction invoke Latch#await to wait 
for the request completion. When brokers are not available, these calls await 
forever and producer never ends. This fix replaces it with the timed equivalent 
await(timeout, unit). When timeout occurred, producer throws a TimeoutException.
   
   *More detailed description of your change,
   if necessary. The PR title and PR message become
   the squashed commit message, so use a separate
   comment to ping reviewers.*
   
   *Summary of testing strategy (including rationale)
   for the feature or bug fix. Unit and/or integration
   tests are expected for any behaviour change and
   system tests should be considered for larger changes.*
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> KafkaProducer with transactionId endless waits when network is disconnection 
> for 10-20s
> ---------------------------------------------------------------------------------------
>
>                 Key: KAFKA-7763
>                 URL: https://issues.apache.org/jira/browse/KAFKA-7763
>             Project: Kafka
>          Issue Type: Bug
>          Components: clients, producer 
>    Affects Versions: 2.1.0
>            Reporter: weasker
>            Assignee: huxihx
>            Priority: Blocker
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> When the client disconnect with the bootstrap server, a KafkaProducer with 
> transactionId endless waits on commitTransaction, the question is the same 
> with below issues:
> https://issues.apache.org/jira/browse/KAFKA-6446
> the reproduce condition you can do it as belows:
> 1、producer.initTransactions();
> 2、producer.beginTransaction();
> 3、producer.send(record1);//set the breakpoint here
> key step: run the breakpoint above 3 then disconnect the network by manual, 
> 10-20seconds recover the network and continute the program by canceling the 
> breakpoint
> 4、producer.send(record2);
> 5、producer.commitTransaction();//endless waits
>  
> I found in 2.1.0 version the modificaiton about the initTransactions method, 
> but the 
> commitTransaction and abortTransaction method, I think it's the same question 
> with initTransactions...



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to