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

Session draining always takes maximum configured timeout

    XMLWordPrintable

    Details

    • Steps to Reproduce:
      Hide

      -Run ha profile with an increased session drain stop timeout:

                  <mod-cluster-config advertise-socket="modcluster" proxies="modclusterproxy" stop-context-timeout="300" connector="default" session-draining-strategy="ALWAYS">
      

      -create a session in an app
      -stop jboss
      -invalidate that session
      -note shutdown drain wait doesn't end

      Show
      -Run ha profile with an increased session drain stop timeout: <mod-cluster-config advertise-socket= "modcluster" proxies= "modclusterproxy" stop-context-timeout= "300" connector= " default " session-draining-strategy= "ALWAYS" > -create a session in an app -stop jboss -invalidate that session -note shutdown drain wait doesn't end

      Description

      The mod_cluster session drain wait is not ending as expected. mod_cluster adds a session listener to be notified of session destruction. That is fired appropriately, but when the listener is invoked, the infinispan session manager still reports the session as active. Thus, this drain loop doesn't end after the notify because it still sees the active session:

                      while ((remainingSessions > 0) && (noTimeout || (timeout > 0))) {
                          ModClusterLogger.LOGGER.drainSessions(remainingSessions, context.getHost(), context);
      
                          listener.wait(noTimeout ? 0 : timeout);
      
                          current = System.currentTimeMillis();
                          timeout = end - current;
                          remainingSessions = context.getActiveSessionCount();
                      }
      

      Can the listeners be invoked when the session is fully removed and no longer considered active?

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  rhusar Radoslav Husar
                  Reporter:
                  aogburn Aaron Ogburn
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  7 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: