This is an automated email from the ASF dual-hosted git repository.
rmaucher pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new e3a697ff7f Fix inaccurate session expiration stats
e3a697ff7f is described below
commit e3a697ff7f81e41d4b88cc7664686c89c734f3df
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 061acfa8ce..a68cebdf99 100644
--- a/java/org/apache/catalina/session/PersistentManagerBase.java
+++ b/java/org/apache/catalina/session/PersistentManagerBase.java
@@ -411,7 +411,6 @@ public abstract class PersistentManagerBase extends
ManagerBase implements Store
}
for (Session session : sessions) {
if (!session.isValid()) {
- expiredSessions.incrementAndGet();
expireHere++;
}
}
@@ -773,7 +772,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 9758216c42..c6625c7b34 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -175,6 +175,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]