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

Utilize Hierarchical Timing Wheels for performant timer

    XMLWordPrintableJSON

Details

    Description

      In this thread on mailing list:
      http://search-hadoop.com/m/Flink/VkLeQPmRa31hd5cw

      Gyula Fóra mentioned that timer deletion becomes performance bottleneck due to the usage of priority queue.

      Benjamin has an implementation for Hierarchical Timing Wheels (Apache License) :

      https://github.com/ben-manes/caffeine/blob/master/caffeine/src/main/java/com/github/benmanes/caffeine/cache/TimerWheel.java

       * A hierarchical timer wheel to add, remove, and fire expiration events in amortized O(1) time. The
       * expiration events are deferred until the timer is advanced, which is performed as part of the
       * cache's maintenance cycle.
      

      We should consider porting the above over to facilitate performant timer.

      Attachments

        Activity

          People

            Unassigned Unassigned
            yuzhihong@gmail.com Ted Yu
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: