[Zope] Help for duplicate key (?) error

Dieter Maurer dieter@handshake.de
Wed, 20 Feb 2002 22:48:46 +0100


Zanotti Michele writes:
 > Excuse if this is a trivial problem. I have Zope 2.5 on NT 4.0. When I'm
 > working on an object in ZMI and click on the view tab I have a Key error.
This looks like a bug (--> file a Collector report
<http://collector.zope.org>).

 > ....
 >   File D:\PROGRA~1\ZOPHEL~2\lib\python\Products\Transience\Transience.py,
 > line 133, in new_or_existing
 >     (Object: session_data)
Here it is checked that the key is not yet there.
The test says: not yet there, create it.

 >   File D:\PROGRA~1\ZOPHEL~2\lib\python\Products\Transience\Transience.py,
 > line 159, in new
 >     (Object: session_data)
Here, it is checked again, before the key is created.
This time, the test says: key already there.
 > KeyError: duplicate key 38979001A0LXI.UStIA

This may happen, when two concurrent requests try to create the
same key at the same time. For example, from a frame set.

The Zope session should protect itself against this quite
usual situation...


Dieter