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

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

GitHub user bowenli86 opened a pull request:

    https://github.com/apache/flink/pull/4786

    [FLINK-7388][DataStream API] ProcessFunction.onTimer() sets processing time 
as timestamp

    ## What is the purpose of the change
    
    Before Flink 1.4.0, when called from a processing-time timer, the 
`ProcessFunction.onTimer()` method sets the current processing time as 
event-time timestamp. This behavior is very subtle and might not be noticed by 
users.
    
    Well, it's harmful because processing-time timestamps are indeterministic 
and not aligned with watermarks. Besides, user-implemented logic depends on 
this wrong timestamp highly likely is unintendedly faulty.
    
    So we've decided to fix it. Upon upgrading to 1.4.0, Flink jobs that are 
using this incorrect event-time timestamp will fail, and users should adapt 
their jobs to the correct logic.
    
    ## Brief change log
    
    - not set a timestamp for processing-time timer
    
    ## Verifying this change
    
    This change is already covered by existing tests
    
    ## Does this pull request potentially affect one of the following parts:
    
    None
    
    ## Documentation
    
      - Does this pull request introduce a new feature? (no)
      - If yes, how is the feature documented? (docs)
    


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

    $ git pull https://github.com/bowenli86/flink FLINK-7388

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

    https://github.com/apache/flink/pull/4786.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 #4786
    
----
commit 1fec305efba8ad94b7d7e72a672186caaf40270e
Author: Bowen Li <bowenl...@gmail.com>
Date:   2017-10-08T22:57:51Z

    [FLINK-7388] ProcessFunction.onTimer() sets processing time as timestamp

commit 7e9afde7519381adadf222febea9640afd41fa2a
Author: Bowen Li <bowenl...@gmail.com>
Date:   2017-10-08T23:26:54Z

    add doc

----


> ProcessFunction.onTimer() sets processing time as timestamp
> -----------------------------------------------------------
>
>                 Key: FLINK-7388
>                 URL: https://issues.apache.org/jira/browse/FLINK-7388
>             Project: Flink
>          Issue Type: Improvement
>          Components: DataStream API
>    Affects Versions: 1.4.0, 1.3.2
>            Reporter: Fabian Hueske
>            Assignee: Bowen Li
>             Fix For: 1.4.0
>
>
> The {{ProcessFunction.onTimer()}} method sets the current processing time as 
> event-time timestamp when it is called from a processing time timer.
> I don't think this behavior is useful. Processing time timestamps won't be 
> aligned with watermarks and are not deterministic. The only reason would be 
> to have _some_ value in the timestamp field. However, the behavior is very 
> subtle and might not be noticed by users.
> IMO, it would be better to erase the timestamp. This will cause downstream 
> operator that rely on timestamps to fail and notify the users that the logic 
> they implemented was probably not what they intended to do.
> What do you think [~aljoscha]?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to