You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Piotr Nowojski (JIRA)" <ji...@apache.org> on 2019/07/02 16:23:01 UTC

[jira] [Commented] (FLINK-13063) AsyncWaitOperator can loose data during checkpointing

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

Piotr Nowojski commented on FLINK-13063:
----------------------------------------

Hot fix is to ensure that {{AsyncWaitOperator}} is always a head of an operator chain.

Proper solution might require a better/extended mailbox implementation (when {{AsyncWaitOperator}} is full, yield only to down the stream operators), that's beyond our reach for 1.9 release.

> AsyncWaitOperator can loose data during checkpointing
> -----------------------------------------------------
>
>                 Key: FLINK-13063
>                 URL: https://issues.apache.org/jira/browse/FLINK-13063
>             Project: Flink
>          Issue Type: Bug
>          Components: API / DataStream
>    Affects Versions: 1.6.4, 1.7.2, 1.8.1, 1.9.0
>            Reporter: Piotr Nowojski
>            Assignee: Piotr Nowojski
>            Priority: Critical
>
> For the following setup of chained operators:
> {noformat}
> SourceOperator -> FlatMap -> AsyncOperator{noformat}
> Lets assume that input buffer of {{AsyncOperator}} is full. We start processing a record from the {{SourceOperator}}, we pass it to the {{FlatMap}}, which fan it out (multiplies it 10 times). First multiplied record reaches {{AsyncOperator}} and is special treated (stored in {{AsyncWaitOperator#pendingStreamElementQueueEntry}} ) and then {{AsyncWaitOperator}} waits (and releases) on the checkpoint lock (in {{AsyncWaitOperator#addAsyncBufferEntry}} . If a checkpoint is triggered now, both {{SourceOperator}} and {{FlatMap}} will be checkpointed assumed that all of those 10 multiplied records were processed, which is not true. Only the first one is checkpointed by the {{AsyncWatiOperator}}. Remaining 9 are not. So if we ever restore state from this checkpoint, we have lost those 9 records.
> Similar issue (I think previously known) can happen if for example some upstream operator to the {{AsyncOperator}} fires a processing time timer, that emits some data. But in that case, {{AsyncWaitOperator#pendingStreamElementQueueEntry}} is being overwritten.
> CC [~aljoscha] [~StephanEwen] [~srichter] 



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