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

Kostas Kloudas commented on FLINK-9362:
---------------------------------------

Hi [~phoenixjiangnan], I am not sure if this issue is a valid one. 

Whenever you are in the middle of processing an element and/or register a timer 
(or doing both), you are holding the checkpoint lock, thus no checkpoints can 
be performed in between operations. 

In addition, whenever a snapshot is taken, you also have the checkpoint lock.

The above, I would say that they guarantee that in the processElement() for 
example, if you are processing an element and registering a timer, either both 
will be included in a checkpoint, or none. And if a failure happens while 
processing the element but before registering the timer, then the fact that you 
were holding the checkpoint lock guarantees that there cannot be a checkpoint 
taken with half of the specified actions performed. 

 

If my understanding of the issue is correct, then I would recommend to close 
the issue.

I think that the cause of the issue described in [1] requires more digging and 
seems to be a bug rather than a feature.

What do you think?

 

[1] 
http://mail-archives.apache.org/mod_mbox/flink-user/201805.mbox/%3ccaf+gcdau6nnqwgpgkrqtgxhaakngmdogs7xuoxcq+0ufshu...@mail.gmail.com%3E

> Document that Flink doesn't guarantee transaction of modifying state and 
> register timers in processElement()
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-9362
>                 URL: https://issues.apache.org/jira/browse/FLINK-9362
>             Project: Flink
>          Issue Type: Improvement
>          Components: Documentation
>    Affects Versions: 1.6.0
>            Reporter: Bowen Li
>            Assignee: Bowen Li
>            Priority: Major
>             Fix For: 1.6.0
>
>




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

Reply via email to