Skip to content
This repository has been archived by the owner on Dec 16, 2020. It is now read-only.

Commit

Permalink
log more data
Browse files Browse the repository at this point in the history
  • Loading branch information
agroszer committed Nov 14, 2016
1 parent 189ce83 commit a5a24c0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/cipher/session/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,18 @@ def _p_resolveConflict(self, old, committed, new):
for k, v in new['data'].items():
if k in c_new:
try:
verror = False
rdata_k = result_data[k]
neq = (v != rdata_k)
# value is not the same -> raise ConflictError
except ValueError:
# uncomparable PersistentReferences -> raise ConflictError
neq = True
verror = True
if neq:
# log everything, debugging ConflictResolution is hard
formatExtraData(extra, k=k, v=v, c_new=c_new, result=result)
formatExtraData(extra, k=k, v=v, c_new=c_new, result=result,
rdata_k=rdata_k, verror=verror)
LOG.error("Conflicting insert", extra=extra)
raise ConflictError("Conflicting insert")
if k in result_data:
Expand Down

0 comments on commit a5a24c0

Please sign in to comment.