Commit cf32e594 authored by Julien Muchembled's avatar Julien Muchembled

Disable "client: optimize by not calling lastTransaction at the end of transactions"

This disables commit 4a4d2e64.

git-svn-id: 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent e45dfae8
......@@ -51,10 +51,10 @@ if needs_patch:
Connection.tpc_finish = tpc_finish
if Connection._nexedi_fix != 2:
if Connection._nexedi_fix != 3:
raise Exception("A different ZODB fix is already applied")
except AttributeError:
Connection._nexedi_fix = 2
Connection._nexedi_fix = 3
# Whenever an connection is opened (and there's usually an existing one
# in DB pool that can be reused) whereas the transaction is already
......@@ -93,13 +93,18 @@ if needs_patch:
# slow so we prefer to not call it where it's not useful.
# I don't know any legitimate use of DB access outside a transaction.
# But old versions of ERP5 (before 2010-10-29 17:15:34) and maybe other
# applications do not always call 'transaction.begin()' when they should
# so this patch disabled as a precaution, at least as long as we support
# old software. This should also be discussed on zodb-dev ML first.
def afterCompletion(self, *ignored):
except AttributeError: # old ZODB (e.g. ZODB 3.4)
Connection.afterCompletion = afterCompletion
#Connection.afterCompletion = afterCompletion
class _DB(object):
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment