[Zodb-checkins] CVS: ZODB3/ZODB - Transaction.py:1.39.2.3

Barry Warsaw barry@wooz.org
Thu, 23 Jan 2003 18:14:37 -0500


Update of /cvs-repository/ZODB3/ZODB
In directory cvs.zope.org:/tmp/cvs-serv12308

Modified Files:
      Tag: ZODB3-3_1-branch
	Transaction.py 
Log Message:
commit(): In the bare except towards the bottom, we cleaned up the
idioms.  Since t, v, tb were only used in the re-raise, we can get rid
of them and just use a bare raise instead.

_finish_one(): If an exception occurs in tpc_finish(), log the except
at PANIC level.

_finish_many(): Don't set the hosed flag.  There isn't going to be a
hosed state in 3.1.x, but in 3.2 and 4.0 there will be a ZConfig
option that can be set to decide whether hosed states are allowed or
not.


=== ZODB3/ZODB/Transaction.py 1.39.2.2 => 1.39.2.3 ===
--- ZODB3/ZODB/Transaction.py:1.39.2.2	Thu Jan  2 13:05:06 2003
+++ ZODB3/ZODB/Transaction.py	Thu Jan 23 18:14:33 2003
@@ -257,7 +257,6 @@
                 # have to clean up.  First save the original exception
                 # in case the cleanup process causes another
                 # exception.
-                t, v, tb = sys.exc_info()
                 try:
                     self._commit_error(objects, ncommitted, jars, subjars)
                 except:
@@ -265,8 +264,7 @@
                         "A storage error occured during transaction "
                         "abort.  This shouldn't happen.",
                         error=sys.exc_info())
-                    
-                raise t, v, tb
+                raise
         finally:
             del objects[:] # clear registered
             if not subtransaction and self._id is not None:
@@ -358,7 +356,7 @@
             jar.tpc_finish(self)
         except:
             # Bug if it does, we need to keep track of it
-            LOG('ZODB', ERROR,
+            LOG('ZODB', PANIC,
                 "A storage error occurred in the last phase of a "
                 "two-phase commit.  This shouldn\'t happen. ",
                 error=sys.exc_info())
@@ -371,7 +369,7 @@
                 # The database can't guarantee consistency if call fails.
                 jar.tpc_finish(self)
         except:
-            hosed = 1
+            #hosed = 1
             LOG('ZODB', PANIC,
                 "A storage error occurred in the last phase of a "
                 "two-phase commit.  This shouldn\'t happen. "