You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apex.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/05/18 10:41:05 UTC

[jira] [Commented] (APEXMALHAR-2493) KafkaSinglePortExactlyOnceOutputOperator going to the blocked state during recovery

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

ASF GitHub Bot commented on APEXMALHAR-2493:
--------------------------------------------

GitHub user chaithu14 opened a pull request:

    https://github.com/apache/apex-malhar/pull/622

    APEXMALHAR-2493 Fixed the issue of KafkaSinglePortExactlyOnceOutputOperator going to the blocked state during recovery

    @sandeshh @tushargosavi Please review and merge.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/chaithu14/incubator-apex-malhar APEXMALHAR-2493-KafkaExactlyCBBug

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/apex-malhar/pull/622.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #622
    
----
commit c784f4da46d1cf594aa4156135b9c196aa66d931
Author: chaitanya <ch...@apache.org>
Date:   2017-05-18T10:37:52Z

    APEXMALHAR-2493 Fixed the issue of KafkaSinglePortExactlyOnceOutputOperator going to the blocked state during recovery

----


> KafkaSinglePortExactlyOnceOutputOperator going to the blocked state during recovery
> -----------------------------------------------------------------------------------
>
>                 Key: APEXMALHAR-2493
>                 URL: https://issues.apache.org/jira/browse/APEXMALHAR-2493
>             Project: Apache Apex Malhar
>          Issue Type: Bug
>            Reporter: Chaitanya
>            Assignee: Chaitanya
>
> Steps to reproduce the issue: 
> ---------------------------------------
> - Created the Kafka topic with single partition.
> - Created the application with the following DAG:
> BatchSequenceGenerator -> KafkaSinglePortExactlyOnceOutputOperator
>       # of partitions of  KafkaSinglePortExactlyOnceOutputOperator =  2. Let's say KO1, KO2 are the two instances.
> - Launched the app, after some time, manually killed the one of the instance of "KafkaSinglePortExactlyOnceOutputOperator" operator(KO2).
> - During recovery, the instance comes up and after some time, it goes to the blocked state. App master killed this instance.
> Observation:
> ----------------
> * There is an infinite while loop in rebuildPartialWindow() method.
> * While loop will break on the below 2 conditions:
>        a) # of trails for "polled records from Kafka is empty" = 10
>        b) Crossed boundary (consumerRecord.offset() >= currentOffset)
> In this scenario, KO1 keeps on writing the data to Kafka. So, the first condition will not satisfy.
> Operator is not checking the 2nd condition because of the below continue statement: 
>           if (!doesKeyBelongsToThisInstance(operatorId, consumerRecord.key())) {
>             continue;
>           }
> Solution: First check the cross boundary condition and then check the doesKeyBelongsToThisInstance(..).



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)