Commit 88606a09 authored by Julien Muchembled's avatar Julien Muchembled

Comment ZODB patch to tpc_finish

parent fa1328cd
...@@ -12,14 +12,18 @@ ...@@ -12,14 +12,18 @@
# #
############################################################################## ##############################################################################
# NEO requires ZODB to allow TID to be returned as late as tpc_finish. # At the moment, no ZODB release include the following patches.
# At the moment, no ZODB release include this patch.
# Later, this must be replaced by some detection mechanism. # Later, this must be replaced by some detection mechanism.
needs_patch = True if 1:
if needs_patch:
from ZODB.Connection import Connection from ZODB.Connection import Connection
# Allow serial to be returned as late as tpc_finish
#
# This makes possible for storage to allocate serial inside tpc_finish,
# removing the requirement to serialise second commit phase (tpc_vote
# to tpc_finish/tpc_abort).
def tpc_finish(self, transaction): def tpc_finish(self, transaction):
"""Indicate confirmation that the transaction is done.""" """Indicate confirmation that the transaction is done."""
...@@ -50,6 +54,8 @@ if needs_patch: ...@@ -50,6 +54,8 @@ if needs_patch:
Connection.tpc_finish = tpc_finish Connection.tpc_finish = tpc_finish
###
try: try:
if Connection._nexedi_fix != 4: if Connection._nexedi_fix != 4:
raise Exception("A different ZODB fix is already applied") raise Exception("A different ZODB fix is already applied")
......
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