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

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

layfe closed pull request #5881: KAFKA-5503 Idempotent producer ignores 
shutdown while fetching Produc…
URL: https://github.com/apache/kafka/pull/5881
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/clients/src/main/java/org/apache/kafka/clients/producer/internals/Sender.java 
b/clients/src/main/java/org/apache/kafka/clients/producer/internals/Sender.java
index 19d7af2e7a0..6df77677f89 100644
--- 
a/clients/src/main/java/org/apache/kafka/clients/producer/internals/Sender.java
+++ 
b/clients/src/main/java/org/apache/kafka/clients/producer/internals/Sender.java
@@ -492,7 +492,7 @@ private Node awaitLeastLoadedNodeReady(long 
remainingTimeMs) throws IOException
     }
 
     private void maybeWaitForProducerId() {
-        while (!transactionManager.hasProducerId() && 
!transactionManager.hasError()) {
+        while (running && !transactionManager.hasProducerId() && 
!transactionManager.hasError()) {
             Node node = null;
             try {
                 node = awaitLeastLoadedNodeReady(requestTimeoutMs);


 

----------------------------------------------------------------
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:
us...@infra.apache.org


> Idempotent producer ignores shutdown while fetching ProducerId
> --------------------------------------------------------------
>
>                 Key: KAFKA-5503
>                 URL: https://issues.apache.org/jira/browse/KAFKA-5503
>             Project: Kafka
>          Issue Type: Sub-task
>          Components: clients, core, producer 
>    Affects Versions: 0.11.0.0
>            Reporter: Jason Gustafson
>            Assignee: Evgeny Veretennikov
>            Priority: Major
>             Fix For: 2.2.0
>
>
> When using the idempotent producer, we initially block the sender thread 
> while we attempt to get the ProducerId. During this time, a concurrent call 
> to close() will be ignored.



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

Reply via email to