[Zope3-dev] Potential bug of intid

Tadashi Matsumoto ma2 at city.plala.jp
Sun Dec 11 14:16:11 EST 2005


On Sun, 11 Dec 2005 12:43:03 -0500
gary at zope.com wrote.

> On Dec 11, 2005, at 11:00 AM, Tadashi Matsumoto wrote:
> 
> > On Sun, 11 Dec 2005 08:30:06 -0500
> > gary at zope.com wrote.
> >
> >> At which point you should get a conflict error, which in Zope would
> >> cause one of the transactions to be retried without the user's
> >> knowledge and everything would still be good.
> >
> > Generating same intids does not always mean a conflict error.
> 
> Why not?  AFAIK it will.
> 
> Gary


At first, I was thinking the following situation.

    114         uid = self._generateId()
    115         self.refs[uid] = key

Suppose that one thread have generated an id and is stopping at line 114,
another thread happen to genarate same id and finish it's transaction,
after that the former finishes the transaction. Then the conflict will
not occur.

But it seems to be my misunderstanding of zodb's mechanism, I am sorry.

----
Tadashi Matsumoto
ma2 at city.plala.jp


More information about the Zope3-dev mailing list