geode-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GEODE-2889) Generic session module should touch sessions rather than recreate the native session
Date Tue, 09 May 2017 20:16:04 GMT

    [ https://issues.apache.org/jira/browse/GEODE-2889?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16003456#comment-16003456
] 

ASF GitHub Bot commented on GEODE-2889:
---------------------------------------

Github user asfgit closed the pull request at:

    https://github.com/apache/geode/pull/494


> Generic session module should touch sessions rather than recreate the native session
> ------------------------------------------------------------------------------------
>
>                 Key: GEODE-2889
>                 URL: https://issues.apache.org/jira/browse/GEODE-2889
>             Project: Geode
>          Issue Type: Bug
>          Components: http session
>            Reporter: Dan Smith
>
> The session module for generic application servers is doing some magic to try to recreate
native sessions if they have been idle for too long. This can cause failures if the container
expires a session concurrently, because the expiration can happen after we have checked if
the session is valid, but before we can read the session creation time.
> {noformat}
> /*
>          * This is a massively gross hack. Currently, there is no way to actually update
the last
>          * accessed time for a session, so what we do here is once we're into X% of the
session's
>          * TTL we grab a new session from the container.
>          *
>          * (inactive * 1000) * (pct / 100) ==> (inactive * 10 * pct)
>          */
>         if (session.getLastAccessedTime()
>             - session.getCreationTime() > (session.getMaxInactiveInterval() * 10
>                 * percentInactiveTimeTriggerRebuild)) {
>           HttpSession nativeSession = super.getSession();
>           session.failoverSession(nativeSession);
>         }
> {noformat}
> Instead of this, we should just call getSession on the container and have it update the
last accessed time of the native session.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message