Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Done
    • Affects Version/s: 5.1.0.ER1
    • Fix Version/s: 5.1.0.ER3, 5.1.0 GA
    • Component/s: EAP
    • Labels:
      None
    • Release Notes Text:
      Hide
      https://issues.jboss.org/browse/JBPAPP-5175

      The JBossTS TransactionReaper contained a bug which caused it to execute continuously when it was running in dynamic mode, rather than pausing between runs. This caused performance degradation. To fix this issue, JBossTS was updated. As a result, the Reaper now pauses between runs, leading to better performance.
      Show
      https://issues.jboss.org/browse/JBPAPP-5175 The JBossTS TransactionReaper contained a bug which caused it to execute continuously when it was running in dynamic mode, rather than pausing between runs. This caused performance degradation. To fix this issue, JBossTS was updated. As a result, the Reaper now pauses between runs, leading to better performance.
    • Release Notes Docs Status:
      Documented as Resolved Issue

      Description

      JBossTS TransactionReaper contains a bug which results in the reaper executing continuously within dynamic mode, rather than pausing between runs.

      The ReaperThread calls the TransactionReaper.checkingPeriod() method to determine how long it should pause before it can invoke the TransactionReaper.check() method, however there exists a circumstance where the checkingPeriod() will return a negative period for a sustained time, resulting in the thread executing continuously. This occurs when the check() method is invoked while there are existing transactions in the ReaperElementManager.

      The check and checkingPeriod methods use the nextDynamicCheckTime variable to store the absolute time at which the next invocation of check should occur, checkingPeriod returns the difference between that time and the current.

      When the check method is executed after nextDynamicCheckTime has occurred, the method retrieves the first ReaperElement from the ReaperElementManager. The processing continues as follows

      • if no reaperElement present, reset nextDynamicCheckTime to Long.MAX_VALUE
      • if present and expired (reaperElement.getAbsoluteTimeout() <= now) then the element is processed
      • if present and not expired (reaperElement.getAbsoluteTimeout() > now) then do nothing.

      It is the last behaviour which is incorrect as the nextDynamicCheckTime still refers to the previous absolute timeout, i.e. < now, resulting in all calls to checkinPeriod() returning a negative value.

      This will only be halted if one of the other conditions is true, i.e. the ReaperElementManager is empty or the head element must be processed by this thread.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jcoleman Julian Coleman
                  Reporter:
                  kconner Kevin Conner
                  Writer:
                  David Le Sage
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: