Sophana K | 25 Jan 18:34
Picon

Re: This transaction has already gone through ROLLBACK

Hi

I still haven't resolved my rollback assert problem which happens
about once per month.
But I have gathered some tracebacks.
In all cases, it looks like Transaction.__getattr__ gets called at
places I don't understand.
Maybe tracebacks are corrupted?
If someone has a clue where to look at, it would be nice.
I don't understand very well what is the function of the
Transaction.__getattr__ method.

Thanks for your help.

File "/usr/lib/python2.5/site-packages/SQLObject-0.10.3-py2.5.egg/sqlobject/dbconnection.py",
line 866, in doInTransaction
   conn = old_conn.transaction()
 File "/usr/lib/python2.5/site-packages/SQLObject-0.10.3-py2.5.egg/sqlobject/dbconnection.py",
line 398, in transaction
   return Transaction(self)
 File "/usr/lib/python2.5/site-packages/SQLObject-0.10.3-py2.5.egg/sqlobject/dbconnection.py",
line 681, in __init__
   self._connection = dbConnection.getConnection()
 File "/usr/lib/python2.5/site-packages/SQLObject-0.10.3-py2.5.egg/sqlobject/dbconnection.py",
line 281, in getConnection
   self._poolLock.release()
 File "/usr/lib/python2.5/site-packages/SQLObject-0.10.3-py2.5.egg/sqlobject/dbconnection.py",
line 764, in __getattr__
   self.assertActive()
 File "/usr/lib/python2.5/site-packages/SQLObject-0.10.3-py2.5.egg/sqlobject/dbconnection.py",
(Continue reading)

Oleg Broytman | 25 Jan 18:58
X-Face
Picon
Favicon

Re: This transaction has already gone through ROLLBACK

On Mon, Jan 25, 2010 at 06:34:06PM +0100, Sophana K wrote:
> In all cases, it looks like Transaction.__getattr__ gets called at
> places I don't understand.
> I don't understand very well what is the function of the
> Transaction.__getattr__ method.

   Transaction.__getattr__ redirects attribute access to the underlying
connection (self._dbConnection); non-method attributes are wrapped into
ConnWrapper instances; method access are wrapped as instancemethod with
fake class - the class is self.__class__ (Transaction), not the class of
the connection (self._dbConnection); the last one is neccessary to
redirect attribute access on self._dbConnection back to the transaction
instance.

Oleg.
--

-- 
     Oleg Broytman            http://phd.pp.ru/            phd <at> phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
Sophana K | 26 Jan 12:26
Picon

Re: This transaction has already gone through ROLLBACK

Ok thanks
Do you have an idea what could explain the different tracebacks I got?
Could it be related to multithreading?

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
Oleg Broytman | 26 Jan 12:49
X-Face
Picon
Favicon

Re: This transaction has already gone through ROLLBACK

On Tue, Jan 26, 2010 at 12:26:51PM +0100, Sophana K wrote:
> Do you have an idea what could explain the different tracebacks I got?
> Could it be related to multithreading?

   They could be related to multithreading; actually, I am almost
completely sure they are related. On the other hand they could be related
to a "wrong" sequence of calls (attribute access) - a code accessed an
attribute of the connection, the access gets redirected to the transaction,
but 'self' is wrong and there are problems with further attribute access;
similar to a bug I fixed by adding .close() method to Transaction class
because without it .close gets redirected to DBConnection.close but that's
wrong for a transaction.

Oleg.
--

-- 
     Oleg Broytman            http://phd.pp.ru/            phd <at> phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com

Gmane