[Zope] SESSION Errors

Paul Howell paul at smoothstone.com
Thu Feb 19 18:06:19 EST 2004


C and D:
As to conflict errors, does this mean READ conflicts, as in trying to read 
the session info?

If that is the case, then might it not work to try reading twice before 
flipping to the error?

Here's the code snippet from Dennis:

>request=container.REQUEST
>try:
>     session=request['SESSION']
>     return session[varname]
>except KeyError:
>     container.oopsSession( varname )
>     raise

Why not make this more like (completely untested, and this is not my forte, 
but just thinking out loud):

request=container.REQUEST
try:
     session=request['SESSION']
     return session[varname]
except try:
     session=request['SESSION']
     return session[varname]
except KeyError:
     container.oopsSession( varname )
     raise

100:1 against this "try:try:except" structure being valid, but given that 
there is some analogous structure that would have this effect, I would 
think that if there is a 1 in 10,000 chance of failure reading the SESSION 
once, then there's a similar 1 in 10,000 chance of failure reading it a 
second time, and that makes it a 1 in 100,000,000 chance of failure by 
nesting... and the nested try: would only be activated maybe once 1 in 
10,000 times, making it a non-issue as far as performance.

Just my ha'penny, unencumbered by real knowledge of these deep innards of 
zope...
=Paul


At 05:36 PM 2/19/2004, Chris McDonough wrote:
>On Thu, 2004-02-19 at 16:30, Dennis Allison wrote:
> > Chris--
> > I need to squash this bug.  Any thoughts as to were to begin.  Have you
> > tried to locate the error?
> >       -d
>
>Yes.  And I haven't been successful.  I suspect that it's something
>related to conflict errors.
>
>- C




More information about the Zope mailing list