rhauch opened a new pull request #10238:
URL: https://github.com/apache/kafka/pull/10238


   **_NOTE: This is targeted to the `2.8` branch (currently frozen), but 
includes the same commit cherry-picked from `trunk` and originating in #10016 
for (KAFKA-10340)[https://issues.apache.org/jira/browse/KAFKA-10340]._**
   
   **_This should be merged only after this issue is approved as a blocker for 
2.8.0, or after 2.8.0 is released._**
   
   Close the producer in `WorkerSourceTask` when the latter is cancelled. If 
the broker do not autocreate the topic, and the connector is not configured to 
create topics written by the source connector, then the `WorkerSourceTask` main 
thread will block forever until the topic is created, and will not stop if 
cancelled or scheduled for shutdown by the worker.
   
   Expanded an existing unit test for the WorkerSourceTask class to ensure that 
the producer is closed when the task is abandoned, and added a new integration 
test that guarantees that tasks are still shut down even when their producers 
are trying to write to topics that do not exist.
   
   Author: Chris Egerton <[email protected]>
   Reviewed: Greg Harris <[email protected]>, Randall Hauch <[email protected]>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to