Transaction Manager Brokenness

Bug #142358 reported by Toby Dickenson
2
Affects Status Importance Assigned to Milestone
transaction
Invalid
Low
Jeremy Hylton

Bug Description

From the "Transaction Manager Changes" thread on zodb-dev.

>TD> I am seeing some unusual behaviour in some classes which hook
>TD> into the transaction manager since Jeremy's sortKey changes. I
>TD> have not been able to reproduce a minimal test case yet, so this
>TD> has been diagnosed from activity logs on a production system.
>
>TD> The following two call sequences are ringing my alarm bells:
>
>TD> 1. abort, abort (that is, abort called twice on
>TD> the same _p_jar object with no intermediate calls)
>
>TD> 2. tpc_begin, abort, tpc_abort
>
>TD> Does this indicate a bug somewhere in the transaction manager,
>TD> or should my objects be expecting this?
>
>TD> (if it helps, there may be subtransactions involved too)
>

Tags: bug zope
Revision history for this message
Jeremy Hylton (jeremy-alum) wrote :

Status: Pending => Accepted

 Supporters added: jeremy

It might help to know more about what the resource manager (aka jar) is actually doing. For example, abort() is called with two arguments -- an object and a transaction. What objects are getting passed to abort? Is it the same object twice or is it two different objects?

Revision history for this message
Jeremy Hylton (jeremy-alum) wrote :

The tpc_begin(), abort(), tpc_abort() sequence looks normal to me. The transaction got started, something went wrong in the middle (like a ConflictError), so the current transaction was aborted. An abort during 2PC requires that we call abort() for each object and then call tpc_abort().

Is there some specific problem or unusual behavior you are seeing? Or are you just nervous about log messages you haven't seen before?

Revision history for this message
Toby Dickenson (htrd) wrote :

> Is there some specific problem or unusual behavior you are seeing? Or
> are you just nervous about log messages you haven't seen before?

I am fairly sure that my objects have never experienced this call sequence before this recent change. Does that qualify as 'unusal behaviour'?

My objects are not seeing any *bad* behaviour, but only thanks to defensive programming. My log messages come from branches that I never expected to be taken.

> The tpc_begin(), abort(), tpc_abort() sequence looks normal to

Really? Having the abort() in the middle *looks* wrong to me, in the same way that mismatched parentheses *look* wrong.

(As I said before, I am not entirely confident that my expectations are correct here)

Revision history for this message
Florent Guillaume (efge) wrote :

This will be closed unless details are added, because this is very old and vague.
Also ZODB has changed a lots since then.

Revision history for this message
Florent Guillaume (efge) wrote :

Changes: submitter email, edited transcript, importance (critical => low)

Tres Seaver (tseaver)
Changed in zope2:
status: Confirmed → Invalid
affects: zope2 → transaction
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.