Broken objects should give access to their state

Bug #143531 reported by Victor Safronovich on 2005-09-28
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zope 2
Fix Released
Medium
Unassigned

Bug Description

I try to migrate my old database from zope 2.6.1.

  I have Broken objects, but i don`t get its state in Zope 2.8. I think this is
  because DB.classFactory is overrided to use OFS.Uninstalled.BrokenClass, which
  is bad persistent class.

  the __dict__ of all my Broken objects equals to {'_p_changed':None}.

  my_object._p_mtime does not load it`s state.

Victor Safronovich (suvit) wrote :

"but i don`t get its state in Zope 2.8"
should be -->
it is impossible to get its state in Zope 2.8

sorry for my English :(.

ChrisW (chris-simplistix) wrote :

Status: Pending => Rejected

This needs discussion on a list, Broken Objects are just that: broken, so you can't load their state. Don't see any bug here..

Victor Safronovich (suvit) wrote :

please, reopen, because this is a bug. Broken objects should provide access to their state.

Florent Guillaume (efge) wrote :

Status: Rejected => Pending

Jim asserted that this is a bug.

Hanno Schlichting (hannosch) wrote :

The Broken class from ZODB.broken holds the state, but the one from OFS.Uninstalled doesn't. OFS should be updated to use the ZODB class.

Changed in zope2:
status: New → Confirmed
Godefroid Chapelle (gotcha) wrote :

Fix in http://svn.zope.org/Zope/branches/gotcha-LP143531. (was branched from 2.12)

Christian Theune (ctheune) wrote :

Hmm, weird. I checked it out and tried whether the test does the right thing, but when I remove your patch from the code base and leave the test in it doesn't give me a failure, so something is smelly. Could you recheck this?

Godefroid Chapelle (gotcha) wrote :

Oops. Test written again. Breaks when my fix is absent; pass when my fix is there.

see http://svn.zope.org/Zope/branches/gotcha-LP143531/src/OFS/tests/test_Uninstalled.py?rev=113651&r1=113523&r2=113651

Godefroid Chapelle (gotcha) wrote :

committed in 2.12 and trunk after Hanno's review.

Changed in zope2:
milestone: none → 2.12.9
status: Confirmed → Fix Committed
Changed in zope2:
status: Fix Committed → Fix Released
Julien Muchembled (jmuchemb) wrote :

The bug is still there because the committed patch fixes a value after it is cached.
It can be reproduced when a broken object is reloaded (after it was removed from the connection cache).

I suggest the attached patch to fix the issue.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers