[Schevo-devel] object corruption
Matthew Scott
mscott at goldenspud.com
Fri Nov 11 20:56:10 EST 2005
Fixed in trunk, revision 1409.
Here's a snippet from the change, which explains what was happening
and how it was fixed:
# During database evolution, it may turn out that fields
# get removed. For time efficiency reasons, Schevo does
# not iterate through all entities to remove existing
# data. Therefore, when getting entity fields from the
# database here, ignore fields that exist in the entity
# but no longer exist in the extent.
Joseph, I'd like to extend you a virtual handshake for helping us find
and fix these evolution bugs. You have been stress-testing the
evolution stuff much more than Pat or I have had the opportunity to
lately. :) We are going to work on evolution some more (including
evolving from one schema version to the next, instead of inside the
same version) for the next beta release, but it's nice to know that
the corner cases in the existing code are being fixed as a result of
regular use :)
On 11/11/05, joseph schlesinger <joes at alt2254.org> wrote:
> I'm getting a traceback (see below) that leads me to believe that one of
> the objects in my database is corrupt. The problem seems limited to one
> of a couple of dozen objects in the database. Can someone point me to a
> reference that would suggest how to go about repairing the object and/or
> database file?
> Thanks
>
> ----------------------------
> >>tx = suspected_corrupt_object.t.update(existing_field = 'new data')
> Traceback (most recent call last):
> File "<input>", line 1, in ?
> File "c:\code\schevo\src\schevo\entity.py", line 336, in t_update
> tx = self._Update(self, **kw)
> File "c:\code\schevo\src\schevo\transaction.py", line 372, in __init__
> fields = entity.sys.fields(include_readonly_fget=False)
> File "c:\code\schevo\src\schevo\entity.py", line 429, in fields
> stored_values = e._db._entity_fields(e._extent.name, e._oid)
> File "c:\code\schevo\src\schevo\database.py", line 536, in _entity_fields
> field_name = field_id_name[field_id]
> File "c:\code\schevo\src\schevo\store\persistent_dict.py", line 31, in __getitem__
> return self.data[key]
> KeyError: 124641830
>
>
> _______________________________________________
> Schevo-devel mailing list
> Schevo-devel at lists.orbtech.com
> http://lists.orbtech.com/mailman/listinfo/schevo-devel
>
--
Matthew R. Scott
More information about the Schevo-devel
mailing list