I see the persisted copy in the file and it has two keys, so I don't think
that's it. It's probably some sort of parallelism issue since it happens
only occasionally, but the map is a ConcurrentHashMap, so I can't see how
it would be overwritten.

On Mon, 18 May 2020, 19:47 Mark Thomas, <ma...@apache.org> wrote:

> On 18/05/2020 15:23, Jonathan Yom-Tov wrote:
> > Here's my setup: I have two Tomcats using PersistentManager with
> FileStore
> > to store sessions on a NFS they both have access to. Inside the session
> > there's an object which contains a map. I also have a request listener
> that
> > logs the contents of the map on every request.
> >
> > I kill one Tomcat and I can see in the session file that the map contains
> > two keys. I then make a request to the remaining Tomcat and I can see the
> > map contains only one key.
> >
> > The only way I can think of that that would happen is if the map was only
> > partially loaded from the file. Is that even possible? Any good ideas on
> > how to debug this?
> Best guess you add the Map containing one key to the session and then
> later add a second key the Map. Tomcat doesn't consider the session to
> be updated when the second key is added so the persisted copy doesn't
> get updated.
> Mark
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to