[horde] cleanup of horde_histories when removal of calendar or removeUserData()

Steffen skhorde at smail.inf.fh-bonn-rhein-sieg.de
Tue Jun 10 14:43:11 UTC 2014

On Fri, 6 Jun 2014, Michael J Rubinsky wrote:
> Quoting Steffen <skhorde at smail.inf.fh-bonn-rhein-sieg.de>
>> after I've setup Horde 5 (horde 5.1.6 stable), I'm testing to remove user 
>> data from it currently.
>> It looks like many - if not all - entries remain in horde_histories, if I 
>> use the horde-remove-user-data script to remove an user. Actually for 
>> testing purpose I have removed all users from my DB. :-)
>> If I remove a calendar, all events get a history item with action "delete". 
>> However, if the calendar is gone, which parts / functions will access that 
>> item ever? Because the "add" log entry does not contain any data, you 
>> cannot rebuilt a deleted event with that information.
>> I suppose that applies to any other folder-like object (container) as well, 
>> such as notepads, addressbooks,& tasks.
>> If one removes an user with removeUserData() or the horde-remove-user-data 
>> script, those entries remain as well. And because the container is gone, 
>> you cannot know, to which user the entry belongs to. history_who contains 
>> the deleter, which probably is an admin, e.g. for the script.
>> My question is: would it harm, if one removes the history items, when the 
>> parent container (calendar, address book, ...) of the object is removed?
>> Or if the immediate removal is not appropriate, could the history maintain 
>> a field like "timestamp when parent container got removed", so one can run 
>> a database cleanup with this information on a regular base?
>> I suppose to let each Horde app handle the cleanup itself is required, 
>> because the naming convention of object_uid is app depended and you cannot 
>> guess how to verify the existance of the parent from the object_uid value 
>> with an outside script for sure.
> The delete entries are required for synchronization.  If you remove them, 
>  and synchronization clients that have not connected since the deletion took 
> place will never know to remove the items. 

Hm, I thought that if the calendar or parent container is gone, no client 
would be able to query the status of the event or other object anymore, 
because they must query the container first.

OK, makes sense if this assumption is wrong.



More information about the horde mailing list