Issue 332 in glassdb: expired Seaside30 sessions served up until the expiry process explicitly removes the session

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue 332 in glassdb: expired Seaside30 sessions served up until the expiry process explicitly removes the session

glassdb
Status: Accepted
Owner: [hidden email]
Labels: Type-Defect Priority-Medium GLASS-Seaside30 Version-1.0-beta.8

New issue 332 by [hidden email]: expired Seaside30 sessions served  
up until the expiry process explicitly removes the session
http://code.google.com/p/glassdb/issues/detail?id=332

see  
http://forum.world.st/Take-advantage-of-the-largest-STIC-12-conference-discounts-by-registering-this-week-tp4286264p4368867.html

Reply | Threaded
Open this post in threaded view
|

Re: Issue 332 in glassdb: expired Seaside30 sessions served up until the expiry process explicitly removes the session

glassdb

Comment #1 on issue 332 by [hidden email]: expired Seaside30 sessions  
served up until the expiry process explicitly removes the session
http://code.google.com/p/glassdb/issues/detail?id=332

I walked through the code of WARcLastAccessExpiryPolicy to check this.

Since the lastCount instvar is only increased by the expiration task, the  
method below will always return false when no expiration task is running.  
In fact, the way I understand this is that a session will be expired only  
if it has not been accessed in between runs of the expiration task (if the  
counter value has not changed since last expiration task run). I don't  
think there is another way of doing this if I understand the necessity of  
the RcCounter usage correctly.

isExpired: timeout updating: updating

        | value |
        ^(value := self counter value) > lastCount
                ifTrue: [ "accessed since last scan"
                        updating
                                ifTrue: [
                                        lastCount := value.
                                        time := Time totalSeconds ].
                        false]
                ifFalse: [ (Time totalSeconds - time) > timeout ]

Reply | Threaded
Open this post in threaded view
|

Re: Issue 332 in glassdb: expired Seaside30 sessions served up until the expiry process explicitly removes the session

glassdb

Comment #2 on issue 332 by [hidden email]: expired Seaside30  
sessions served up until the expiry process explicitly removes the session
http://code.google.com/p/glassdb/issues/detail?id=332

Ah, so therein lies the bug ...

If I recall correctly, the problem was that multiple gems could be  
accessing setting the access time for a session simultaneously and  
WARcLastAccessExpiryPolicy was introduced to eliminate those commit  
conflicts ...

I don't recall if I explicitly made the algorithm reliant running the  
expiry task in a timely fashion or if I just didn't consider the  
possibility.

Nonetheless, I don't think it is acceptable to rely on the expiry process,  
so I will need look into this a bit more ...