Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-19550

Distributed timer service implementation does not handle suspend correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • 35.0.0.Beta1
    • 33.0.0.Final
    • Clustering, EJB
    • None

      The distributed timer service does not handle server suspension correctly. The scheduler mechanism (i.e. org.wildfly.clustering.server.scheduler.Scheduler) runs and timers are scheduled to fire even when the server is suspended. While timer invocation is prevented while the server is suspended, the fact that the timer service is effectively running while the server is suspended creates some problems.
      In the distributed timer service case, a suspended server will still own cache segments, and thus will prevent successful invocation of persistent timers that could be handled by another cluster member. Additionally, the timer service consumes CPU unnecessarily while the server is suspended.

      For the distributed timer service, we want a suspended server to own no segments. We can achieve this by configuring the cache with a zero capacity. On resume, we restart the cache with its default capacity. No actual change to the timer service itself should be required.
      This strategy has the advantage of handling other cases as well. For example, a suspended server should also not own any web sessions (scheduling them for expiration, etc).

              pferraro@redhat.com Paul Ferraro
              pferraro@redhat.com Paul Ferraro
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: