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

ASF GitHub Bot commented on FLINK-3595:
---------------------------------------

Github user StephanEwen commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1780#discussion_r55864951
  
    --- Diff: 
flink-runtime/src/test/java/org/apache/flink/runtime/taskmanager/TaskCancelAsyncProducerConsumerTest.java
 ---
    @@ -0,0 +1,309 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.flink.runtime.taskmanager;
    +
    +import org.apache.flink.configuration.ConfigConstants;
    +import org.apache.flink.configuration.Configuration;
    +import org.apache.flink.runtime.instance.ActorGateway;
    +import org.apache.flink.runtime.io.network.api.writer.RecordWriter;
    +import 
org.apache.flink.runtime.io.network.api.writer.ResultPartitionWriter;
    +import org.apache.flink.runtime.io.network.partition.consumer.InputGate;
    +import org.apache.flink.runtime.jobgraph.DistributionPattern;
    +import org.apache.flink.runtime.jobgraph.JobGraph;
    +import org.apache.flink.runtime.jobgraph.JobStatus;
    +import org.apache.flink.runtime.jobgraph.JobVertex;
    +import org.apache.flink.runtime.jobgraph.tasks.AbstractInvokable;
    +import org.apache.flink.runtime.jobmanager.scheduler.SlotSharingGroup;
    +import org.apache.flink.runtime.messages.JobManagerMessages.CancelJob;
    +import org.apache.flink.runtime.testingUtils.TestingCluster;
    +import 
org.apache.flink.runtime.testingUtils.TestingJobManagerMessages.NotifyWhenJobStatus;
    +import 
org.apache.flink.runtime.testingUtils.TestingJobManagerMessages.WaitForAllVerticesToBeRunning;
    +import org.apache.flink.types.LongValue;
    +import org.apache.flink.util.TestLogger;
    +import org.junit.Test;
    +import scala.concurrent.Await;
    +import scala.concurrent.Future;
    +import scala.concurrent.duration.Deadline;
    +import scala.concurrent.duration.FiniteDuration;
    +
    +import java.util.concurrent.TimeUnit;
    +
    +import static org.junit.Assert.assertEquals;
    +import static org.junit.Assert.assertNotNull;
    +import static org.junit.Assert.assertTrue;
    +
    +public class TaskCancelAsyncProducerConsumerTest extends TestLogger {
    --- End diff --
    
    If this fires up a test cluster, it should probably be an IT case


> Kafka09 consumer thread does not interrupt when stuck in record emission
> ------------------------------------------------------------------------
>
>                 Key: FLINK-3595
>                 URL: https://issues.apache.org/jira/browse/FLINK-3595
>             Project: Flink
>          Issue Type: Bug
>          Components: Kafka Connector
>    Affects Versions: 1.0.0
>            Reporter: Stephan Ewen
>            Assignee: Ufuk Celebi
>            Priority: Critical
>             Fix For: 1.1.0, 1.0.1
>
>
> When canceling a job, the Kafka 0.9 Consumer Thread may be stuck in a 
> blocking method (output emitting) and never wakes up.
> The thread as a whole cannot be simply interrupted, because of a bug in Kafka 
> that makes the consumer freeze/hang up on interrupt.
> There are two possible solutions:
>   - allow and call interrupt when the consumer thread is emitting elements
>   - destroy the output network buffer pools eagerly on canceling. The Kafka 
> thread will then throw an exception if it is stuck in emitting elements and 
> it will terminate, which is accepted in case the status is canceled.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to