[jboss-jira] [JBoss JIRA] (WFLY-7032) Optimize distributed web session creation
Paul Ferraro (JIRA)
issues at jboss.org
Thu Sep 1 17:23:00 EDT 2016
Paul Ferraro created WFLY-7032:
----------------------------------
Summary: Optimize distributed web session creation
Key: WFLY-7032
URL: https://issues.jboss.org/browse/WFLY-7032
Project: WildFly
Issue Type: Enhancement
Components: Clustering
Affects Versions: 10.1.0.Final
Reporter: Paul Ferraro
Assignee: Paul Ferraro
Fix For: 11.0.0.Alpha1
Following session ID generation, we currently validate that the session ID is not already in use, in which case, we generate a new ID. This is not only racey, but requires a call to Cache.containsKey(...). This is potentially a costly call, since we need to search both memory and the cache store - particularly costly when using a remote cache store. We eventually add the new session via Cache.putIfAbsent(...), which already atomically ensures no session with that ID already exists.
Additionally, when creating the dependent cache entries for a session (i.e. access meta data, session attributes), we don't need putIfAbsent semantics - a AdvancedCache.withFlags(Flags.IGNORE_RETURN_VALUES).put(...) will suffice.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jboss-jira
mailing list