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

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

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

    https://github.com/apache/flink/pull/5977#discussion_r187592761
  
    --- Diff: 
flink-streaming-java/src/test/java/org/apache/flink/streaming/util/MockStreamConfig.java
 ---
    @@ -0,0 +1,35 @@
    +/*
    + * 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.streaming.util;
    +
    +import org.apache.flink.api.common.typeutils.base.IntSerializer;
    +import org.apache.flink.configuration.Configuration;
    +import org.apache.flink.runtime.jobgraph.OperatorID;
    +import org.apache.flink.streaming.api.graph.StreamConfig;
    +
    +/**
    + * Handy mock for {@link StreamConfig}.
    + */
    +public class MockStreamConfig extends StreamConfig {
    +   public MockStreamConfig() {
    +           super(new Configuration());
    +
    +           setTypeSerializerIn1(IntSerializer.INSTANCE);
    --- End diff --
    
    Good point, fixed.


> FlinkKafkaProducer011 sometimes throws ProducerFencedExceptions when in 
> EXACTLY_ONCE mode
> -----------------------------------------------------------------------------------------
>
>                 Key: FLINK-9295
>                 URL: https://issues.apache.org/jira/browse/FLINK-9295
>             Project: Flink
>          Issue Type: Bug
>          Components: Kafka Connector
>    Affects Versions: 1.4.2
>            Reporter: Christopher Ng
>            Assignee: Piotr Nowojski
>            Priority: Major
>             Fix For: 1.5.0
>
>
> {{FlinkKafkaProducer011}} can throw {{ProducerFencedExceptions}} if multiple 
> sinks are used within the same sub-task.  This can happen when 
> operator-chaining results in two different sinks in the same topology being 
> chained into a task, and thus into each of its sub-tasks.
> The problem is that {{TransactionIdsGenerator}} only takes into account the 
> task name, the subtask index, the number of subtasks, and a couple of other 
> things.  All the attributes are the same between different 
> {{FlinkKafkaProducer011s}} within the same sub-task, so they get the same 
> transaction ids and one of them ends up failing.



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

Reply via email to