From: James G. S. (jim) <jg...@sa...> - 2007-09-29 21:20:25
|
bm...@ca... wrote: > Hi all, > > some help/pointers needed. There is a serious possibility of corruption of data > in 2.2.8 version, see http://bugs.gramps-project.org/view.php?id=1187 > > Which users will have corrupt data: > > People who did the following: > > 1/open a .gramps file with family,event,place,media,source or repository > bookmark. Person bookmark does not pose a problem, or add a > family,event,place,media,source or repository bookmark to a .gramps file > > 2/save this .gramps > > 3/reopen this .gramps file. > These people will now have a family,event,place,media,source *AND* repository > object with the same handle as the bookmarked item, and with empty data > (perhaps default type will be set). > > The above is a serious corruption as the handle is supposed to be unique. The > check and repair tool cannot resolve this, users should manually remove these > false objects. > > I committed patch to SVN that solves this bug, but some things remain open: > > 1/ the bookmark menu contains wrong entries, namely, on eg the event bookmarks, > one also sees the person bookmarks in 2.2.8. This is not the case in 3.0 > > 2/ solving the bug does not remove the corruption in databases of users. Can we > change the check/repair tool to resolve this? > I am thinking: for every handle, check if the same handle is not used in one of > the other objects. if this is the case, then notify user. However, how to > proceed? We cannot just delete objects, we do not know which one is the correct > object, although the wrong objects can probably be found by finding objects with > no data in it (source with no title, empty repository record, ...). > > A more important complication: if we delete one of these objects, we may not > delete the secondary index, as that contains valid information for the object > that really exists. > > I am normally not in the neighborhood of a computer till tuesday, so if somebody > can start to look into this, it would be most appreciated. > > > In attachment such a corrupted .gramps file, which will on import produce a > corrupted grdb. > If you open the file and browse down, you see the bookmarks which are completely > wrong (bug solved in SVN), and eg if you look on handle _ad526327e5d16b9d7c8 you > will find an event, a family, a source, a place, an object (media) and a > repository with that handle. The family is the correct one, the rest was > created by the bug. > > So check/repair should be able to repair this .gramps file, as users will be out > there with a database like that due to the bugs in 2.2.8 General question: When a bug produces corruption, is the recovery of a corrupted db considered part of the bug, or another issue. I would think the latter. In this spirit, I suggest that issue #1187 receive one more code change to perform list copy in the GrampsDbBookmarks.set() function like in __init__(), and mark that issue closed. Then create another bug for recovering from corrupt db caused by 1187. I'm assuming the 1187 bug affects only xml db output, and not bsd. If I am misinterpreting Benny's comments about that, somebody clue me in! :-) Regards, ..jim |