Bug 51447 - Session type changes from Backup to Primary
Summary: Session type changes from Backup to Primary
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 7
Classification: Unclassified
Component: Manager (show other bugs)
Version: trunk
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-28 11:15 UTC by Eiji Takahashi
Modified: 2019-03-20 01:44 UTC (History)
0 users



Attachments
patch (1.67 KB, application/octet-stream)
2011-06-28 11:15 UTC, Eiji Takahashi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eiji Takahashi 2011-06-28 11:15:18 UTC
Created attachment 27223 [details]
patch

Steps to reproduce:

(1) Start 3 Tomcat instances that are using BackupManager.

(2) Run 3 HTMLManagers corresponding to each node.

(3) Run web application that has distributable in its web.xml.

(4) Click the link of the number of sessions for this application.

(5) If the displayed session type is Backup, click the link of session id.
And return to sessions list page soon.
Then, the session type change to Primary.

When the session detail page is displayed, getSessionForNameAndId() calls ctxt.getManager().findSession(), and findSession() calls session.get(id).
If the cluster is using BackupManager, "session" is instance of LazyReplicatedMap. And LazyReplicatedMap.get() set session type to "primary". 

I thought the solutions of this issue.

(A) Not use findSession(). Retrieve session information from local map.
-> see attached patch

Or
(B) Write the note as follows to the sessions list page. 
"If you click the backup type's sessionid, then the type change to primary."

Regards.
Comment 1 Mark Thomas 2011-06-28 16:22:33 UTC
Thanks for the report and the patch. A variation has been applied to 7.0.x and will be in 7.0.17 onwards.