You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2020/06/29 20:22:10 UTC
[tomcat] branch master updated: Fix BZ 64560 Don't clear
DeltaRequest when changing session ID
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/master by this push:
new d98748d Fix BZ 64560 Don't clear DeltaRequest when changing session ID
d98748d is described below
commit d98748d725edda58546413e809fc8e70048354e0
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Jun 29 21:21:30 2020 +0100
Fix BZ 64560 Don't clear DeltaRequest when changing session ID
The calls to DeltaSession.setID() are either from creating a new session
(in which case the DeltaRequest does not need to be reset) or from
changing the session ID in which pending changes should be retained.
---
java/org/apache/catalina/ha/session/DeltaSession.java | 10 +++++++---
webapps/docs/changelog.xml | 9 +++++++++
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/java/org/apache/catalina/ha/session/DeltaSession.java b/java/org/apache/catalina/ha/session/DeltaSession.java
index 8d0e6c2..8d0f8e1 100644
--- a/java/org/apache/catalina/ha/session/DeltaSession.java
+++ b/java/org/apache/catalina/ha/session/DeltaSession.java
@@ -325,7 +325,12 @@ public class DeltaSession extends StandardSession implements Externalizable,Clus
@Override
public void setId(String id, boolean notify) {
super.setId(id, notify);
- resetDeltaRequest();
+ lockInternal();
+ try {
+ deltaRequest.setSessionId(getIdInternal());
+ } finally{
+ unlockInternal();
+ }
}
@@ -337,8 +342,7 @@ public class DeltaSession extends StandardSession implements Externalizable,Clus
*/
@Override
public void setId(String id) {
- super.setId(id, true);
- resetDeltaRequest();
+ setId(id, true);
}
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index c95c1ec..c5708d3 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -129,6 +129,15 @@
</update>
</changelog>
</subsection>
+ <subsection name="Cluster">
+ <changelog>
+ <fix>
+ <bug>64560</bug>: Refactor the replication of a changed session ID for a
+ replicated session so that the list of changes associated with the
+ session is not reset when the session ID changes. (markt)
+ </fix>
+ </changelog>
+ </subsection>
<subsection name="Web Applications">
<changelog>
<update>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org