This is an automated email from the ASF dual-hosted git repository.
rmaucher pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push:
new 67a07f709b Fix inaccurate session expiration stats
67a07f709b is described below
commit 67a07f709b78dfb59ed7cb67aa27870d565a9038
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 c31d05fb2f..a762136a1c 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -179,6 +179,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]