Commit 6e842912 authored by Vincent Pelletier's avatar Vincent Pelletier

Extend conflict logging on client.

git-svn-id: 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 25c7d18d
......@@ -618,6 +618,8 @@ class Application(object):
new_data = tryToResolveConflict(oid, conflict_serial, serial,
if new_data is not None:'Conflict resolution succeed for %r:%r with %r',
dump(oid), dump(serial), dump(conflict_serial))
# Mark this conflict as resolved
resolved_conflict_serial_dict[oid] = \
......@@ -626,6 +628,12 @@ class Application(object):
resolved = True
else:'Conflict resolution failed for %r:%r with %r',
dump(oid), dump(serial), dump(conflict_serial))
else:'Conflict reported for %r:%r with later ' \
'transaction %r , cannot resolve conflict.')
if not resolved:
# XXX: Is it really required to remove from data_dict ?
del data_dict[oid]
......@@ -17,6 +17,7 @@
from ZODB.TimeStamp import TimeStamp
from neo import logging
from neo.client.handlers import BaseHandler, AnswerBaseHandler
from neo.protocol import NodeTypes, ProtocolError
from neo.util import dump
......@@ -71,6 +72,8 @@ class StorageAnswersHandler(AnswerBaseHandler):
local_var =
object_stored_counter_dict = local_var.object_stored_counter_dict[oid]
if conflicting:'%r report a conflict for %r with %r', conn,
dump(oid), dump(serial))
conflict_serial_dict = local_var.conflict_serial_dict
pending_serial = conflict_serial_dict.get(oid)
resolved_serial = local_var.resolved_conflict_serial_dict.get(oid)
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