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 2018/04/03 08:54:32 UTC

[GitHub] flink pull request #5790: [FLINK-9107][docs] document timer coalescing for P...

Github user aljoscha commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5790#discussion_r178754487
  
    --- Diff: docs/dev/stream/operators/process_function.md ---
    @@ -269,4 +269,38 @@ override def onTimer(timestamp: Long, ctx: OnTimerContext, out: Collector[OUT]):
     }
     {% endhighlight %}
     </div>
    -</div>
    \ No newline at end of file
    +</div>
    +
    +## Optimisations
    +
    +### Timer Coalescing
    +
    +Every timer registered at the `TimerService` via `ctx.timerService().registerEventTimeTimer()` will
    +be stored on heap and enqueued for execution. There is, however, a maximum of one timer per key and
    +timestamp at a millisecond resolution and thus, in the worst case, every key may have a timer for
    +each upcoming millisecond. Even if you do not do any processing for outdated timers in `onTimer`
    +(as above), this may put a significant burden on the Flink runtime.
    +
    +Since there is only one timer per key and timestamp, however, you may coalesc timers by reducing the
    --- End diff --
    
    typo: coalesc -> coalesce


---