You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by aljoscha <gi...@git.apache.org> on 2016/06/13 13:47:54 UTC

[GitHub] flink issue #2093: [FLINK-3714] Add Support for "Allowed Lateness"

Github user aljoscha commented on the issue:

    https://github.com/apache/flink/pull/2093
  
    I had some inline comments.
    
    One other thing I would like to see changed is moving the logic that checks whether to do cleanup from `cleanup()` to the call-site. So in `processElement()` it would be:
    ```
    if (combinedTriggerResult.isPurge) {
      cleanup(...);
    } else {
      registerCleanupTimer(...);
    }
    ```
    The reason for this is that the check in `cleanup()` for whether a timer is a cleanup timer does not take into account the event-time/processing-time split: if a processing-time timer fires on exactly the cleanup time of an event-time window this would also trigger cleanup.  The code in `processTriggersFor` (which, by the way can be moved back into `processWatermark()` now that you refactored this special event-time trigger hack) would have this check:
    ```
    if (assigner.isEventTime() && isCleanupTimer(...))
    ```
    while the code in `trigger()` would be
    ```
    if (!assigner.isEventTime() && isCleanupTimer(...))
    ```



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---