You are not logged in Log in Join
You are here: Home » Collectors » Adaptable Persistence Engine » Read conflict errors. » collector_issue_contents

Log in
Name

Password

 
 
Issue 10 of Adaptable Persistence Engine [Ape]
Title: Read conflict errors.
Status: Pending Security related: No
Description: How to reproduce: 1) in /fs create folder a 2) in /fs create script: updateA with content: context.a.manage_editProperties({'title' : 'ABC'}) 3) in /f...
From: zordon on: Jun 30, 03 16:39
zordon Last update: Aug 8, 09 23:16
Topic/class: ZODB Interaction/Bug Importance: normal
Version info: Ape-0.6
Issue 10 Transcript
2 entries
= Request - Entry #1 by zordon on Jun 30, 2003 4:39 pm

How to reproduce:
1) in /fs create folder a
2) in /fs create script: updateA with content:
context.a.manage_editProperties({'title' : 'ABC'})
3) in /fs/a create four folders: '1', '2', '3', '4'
4) restart zope
5) right after restarting zope execute: /fs/updateA - it will give you conflict error:
ConflictError: ('/fs/a/1',) already exists

This happened because when 'a' is loaded it creates 4 'ghosted' objects '1', '2', '3', '4'. Ape treated ghosted objects as new objects because setstate function was not yet called and getState function (in zodb3.connection.py ) for those objects will return HASH0.

I have created patch for connection.py that works for me but not 100% sure that I didn't brake anything else:
----------------------------------------
diff -w -b -r1.1 connection.py
256a257
> ghostyObject = 0
262a264
> ghostyObject = 1
267a270
> if ghostyObject : continue