Skip to content

Commit d016843

Browse files
committed
bugfix: missing JSESSIONIDVERSION leads to session not being correctly retrieved in relaxed mode
This only happens on a first request that happens in parallel with session creation, so very sporadic
1 parent 7fae175 commit d016843

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

appserver/web/web-ha/src/main/java/org/glassfish/web/ha/session/management/ReplicationManagerBase.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
* only if the new code is made subject to such option by the copyright
3838
* holder.
3939
*/
40-
// Portions Copyright [2016] [Payara Foundation and/or its affiliates]
40+
// Portions Copyright [2016-2026] [Payara Foundation and/or its affiliates]
4141

4242
package org.glassfish.web.ha.session.management;
4343

@@ -108,6 +108,12 @@ public Session findSession(String id, String version) throws IOException {
108108
if(_logger.isLoggable(Level.FINE)) {
109109
_logger.fine("in findSession: version=" + version);
110110
}
111+
112+
if (isRelaxCacheVersionSemantics() && version == null) {
113+
_logger.fine("Relaxed cache version semantics enabled and version is null, treating as version -1");
114+
version = "-1";
115+
}
116+
111117
if(!this.isSessionIdValid(id) || version == null) {
112118
return null;
113119
}

0 commit comments

Comments
 (0)