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

More fine-grained timer processing

    XMLWordPrintableJSON

Details

    • Hide
      Firing timers can now be interrupted to speed up checkpointing. Timers that were interrupted by a checkpoint, will be fired shortly after checkpoint completes. By default this features is disabled. To enabled it please set:

      execution.checkpointing.unaligned.interruptible-timers.enabled

      to true. Currently supported only by all TableStreamOperators and CepOperator.
      Show
      Firing timers can now be interrupted to speed up checkpointing. Timers that were interrupted by a checkpoint, will be fired shortly after checkpoint completes. By default this features is disabled. To enabled it please set: execution.checkpointing.unaligned.interruptible-timers.enabled to true. Currently supported only by all TableStreamOperators and CepOperator.

    Description

      Timers are currently processed in one big block under the checkpoint lock (under InternalTimerServiceImpl#advanceWatermark. This can be problematic in a number of scenarios while doing checkpointing which would lead to checkpoints timing out (and even unaligned checkpoints would not help).

      If you have a huge number of timers to process when advancing the watermark and the task is also back-pressured, the situation may actually be worse since you would block on the checkpoint lock and also wait for buffers/credits from the receiver.

      I propose to make this loop more fine-grained so that it is interruptible by checkpoints, but maybe there is also some other way to improve here.

      This issue has been for example observed here: https://lists.apache.org/thread/f6ffk9912fg5j1rfkxbzrh0qmp4w6qry

      Attachments

        Issue Links

          Activity

            People

              pnowojski Piotr Nowojski
              nkruber Nico Kruber
              Votes:
              0 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: