This is an automated email from the ASF dual-hosted git repository.
rmaucher pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/11.0.x by this push:
new 831bfb81a9 Fix inaccurate session expiration stats
831bfb81a9 is described below
commit 831bfb81a91d8e836c83a0c4a45469fdac9e71cf
Author: remm <[email protected]>
AuthorDate: Mon May 25 20:48:57 2026 +0200
Fix inaccurate session expiration stats
Two occurrences of a similar issue.
---
java/org/apache/catalina/session/PersistentManagerBase.java | 3 +--
webapps/docs/changelog.xml | 4 ++++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/java/org/apache/catalina/session/PersistentManagerBase.java
b/java/org/apache/catalina/session/PersistentManagerBase.java
index e67bdbfde4..6b2c8a2129 100644
--- a/java/org/apache/catalina/session/PersistentManagerBase.java
+++ b/java/org/apache/catalina/session/PersistentManagerBase.java
@@ -329,7 +329,6 @@ public abstract class PersistentManagerBase extends
ManagerBase implements Store
}
for (Session session : sessions) {
if (!session.isValid()) {
- expiredSessions.incrementAndGet();
expireHere++;
}
}
@@ -654,7 +653,7 @@ public abstract class PersistentManagerBase extends
ManagerBase implements Store
((StandardSession) session).passivate();
writeSession(session);
- super.remove(session, true);
+ super.remove(session, false);
session.recycle();
}
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 916727ee6a..c8b38fe3e3 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -183,6 +183,10 @@
<fix>
Fix shared lock expiration in WebDAV. (remm)
</fix>
+ <fix>
+ Inaccurate session exipration statistics when using the persistent
+ manager. (remm)
+ </fix>
</changelog>
</subsection>
<subsection name="Coyote">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]