Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-7388

ProcessFunction.onTimer() sets processing time as timestamp

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.3.2, 1.4.0
    • 1.4.0
    • API / DataStream
    • None
    • The timestamp of elements emitted from ProcessFunction.onTimer() is no longer set to the timestamp of the timestamp of the timer if the firing timer is a processing-time timer.

    Description

      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?

      Attachments

        Issue Links

          Activity

            People

              phoenixjiangnan Bowen Li
              fhueske Fabian Hueske
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: