tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <>
Subject Re: svn commit: r892341 - /tomcat/trunk/java/org/apache/catalina/session/
Date Mon, 21 Dec 2009 11:01:35 GMT
On 21/12/2009 10:32, Konstantin Kolinko wrote:
> 1)
>          * quickly find that the session is already in sessions, use it and
>          * carry on.
> This is only true if loading succeeds.
> If loading fails, nothing will be found in sessions, and loading will
> be retried. Not good. (Not fatal, but waste of time).

I'm not to concerned about this edge case since if the threads are far
enough apart the code will attempt multiple loads anyway. If we were
going to address this (and I'm not convinced we should) a cache of the
last 1000 sessions requested but not found would probably be a better
way to go.

> 2)
>             if (sessionSwapInLocks.containsKey(id)) {
>                 swapInLock = sessionSwapInLocks.get(id);
> can be replaced with
>            swapInLock = sessionSwapInLocks.get(id);
>            if (swapInLock == null) { ...

Happy to change that.

> 3) I agree with sebb's proposal to make the field final.

And that.

> 3) Modified lines were indented with tabs, instead of spaces.

Sorry about that. I rebuilt my laptop and forgot to configure Eclipse to
use spaces. I'll fix that.

> Misprints:
> s/trues/tries/
> s/will re-creates/will re-create/

And those.

I'll make those changes and update the proposal.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message