Avoid re-reading expired sessions from distributed cache
--------------------------------------------------------
Key: JBAS-6733
URL:
https://jira.jboss.org/jira/browse/JBAS-6733
Project: JBoss Application Server
Issue Type: Sub-task
Security Level: Public (Everyone can see)
Components: Clustering, Web (Tomcat) service
Reporter: Brian Stansberry
Assignee: Brian Stansberry
Priority: Minor
Fix For: JBossAS-5.1.0.CR1
Add logic such that if we don't find a session locally, only check the distributed
cache if we haven't previously handled this session id on this request. If we handled
it previously but it's no longer local, that means it's been invalidated. If we
request an invalidated session from the distributed cache, it will be missing from the
local cache but may still exist on other nodes (i.e. if the invalidation hasn't
replicated yet because we are running in a tx or with async repl). With buddy replication,
asking the local cache for the session will cause the out-of-date session from the other
nodes to be gravitated, thus resuscitating the session.
Previously releases had logic to deal with this, but only covered requests for the session
that come before the code returns from ClusteredSessionValve. Such calls can happen after
that, in particular StandardHostValve makes such a call.
Fix is to store info on invalidated sessions in a thread local, as was done previously,
but to defer clearing the thread local until the Session.recycle method rather than doing
it in the ClusteredSessionValve.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira