Discussion:
[horde] horde-remove-user-data leaves data of user in various tables
Steffen
2014-06-20 14:17:00 UTC
Permalink
I'm using 2014-06-20's stable PEAR packages of Horde 5.

If I remove the user data with horde-remove-user-data, the user data in
the rampage tables are left untouched and there are entries imp:<user>:
in horde_histories still.

a) Would it make sense to call history->removeByParent("imp:<user>") in
removeUserData() of imp?

I think those entries are used by the <user> only and never, if <user>
shares messages via IMAP or a message has more than one recipient, is this
correct?

b) Would it make sense to remove rampage entries of objects, when they are
removed, e.g.:
rampage_objects contains KOrganizer-1071308750.554 type = event
horde_histories contains
67131 kronolith:<user>:KOrganizer-1071308750.554 delete 1403014360

c) Would it make sense to remove rampage entries of users in
removeUserData()?

http://wiki.horde.org/DatabaseCleanup
contains some code to remove tags and finally users from the rampage
tables, I guess. Would it make sense to incorporate those steps into
removeUserData()?

d) horde_activesync_cache, horde_activesync_device_users
still contains entries with cache_user or device_user = <user>, the device
referenced here, is in horde_activesync_device and horde_activesync_state,
too.

That might probably happen because of:
http://bugs.horde.org/ticket/13277 -> orphan devices not removed
http://bugs.horde.org/ticket/13278 -> function call at wrong place

e) the same for: horde_dav_collections
calendars a.s.o. deleted by the script are still listed

Neither deleteInternalCollectionId() nor deleteExternalCollectionId() from
/usr/share/php/Horde/Dav/Storage/Base.php are called anywhere in Horde it
seems. So cleanup is not implemented, yet?

f) imp_sentmail
has entries with sentmail_who = <user>
--
Steffen
Michael J Rubinsky
2014-06-20 16:53:32 UTC
Permalink
Post by Steffen
I'm using 2014-06-20's stable PEAR packages of Horde 5.
If I remove the user data with horde-remove-user-data, the user data
in the rampage tables are left untouched and there are entries
imp:<user>: in horde_histories still.
a) Would it make sense to call history->removeByParent("imp:<user>")
in removeUserData() of imp?
We don't remove history data for any other application. I would say we
shouldn't remove it for IMP either. For other apps, it's possible the
data could still be used for synchronization, for IMP even though this
is not the case, I could see it being used as some type of audit trail.
Post by Steffen
I think those entries are used by the <user> only and never, if
<user> shares messages via IMAP or a message has more than one
recipient, is this correct?
b) Would it make sense to remove rampage entries of objects, when
rampage_objects contains KOrganizer-1071308750.554 type = event
horde_histories contains
67131 kronolith:<user>:KOrganizer-1071308750.554 delete 1403014360
I thought the content system already had some GC functionality to
check for orphaned rampage_objects, though I could be wrong.
Post by Steffen
c) Would it make sense to remove rampage entries of users in
removeUserData()?
I think this *should* be ok. IIRC, for shared resources we tag the
entry twice, once as the owner and once as the user doing the tagging.
Not sure if this is something we can always assume going forward, but
the way things are now, I don't see this as a problem.
Post by Steffen
http://wiki.horde.org/DatabaseCleanup
contains some code to remove tags and finally users from the rampage
tables, I guess. Would it make sense to incorporate those steps into
removeUserData()?
Again, it depends on if we think the data would ever be used from
shared resources. I'm guessing the reason why it hasn't been included
up to now is that we haven't made that decision yet.
Post by Steffen
d) horde_activesync_cache, horde_activesync_device_users
still contains entries with cache_user or device_user = <user>, the
device referenced here, is in horde_activesync_device and
horde_activesync_state, too.
http://bugs.horde.org/ticket/13277 -> orphan devices not removed
http://bugs.horde.org/ticket/13278 -> function call at wrong place
Correct.
Post by Steffen
e) the same for: horde_dav_collections
calendars a.s.o. deleted by the script are still listed
Neither deleteInternalCollectionId() nor
deleteExternalCollectionId() from
/usr/share/php/Horde/Dav/Storage/Base.php are called anywhere in
Horde it seems. So cleanup is not implemented, yet?
f) imp_sentmail
has entries with sentmail_who = <user>
This table is self-cleaning, IIRC.
--
mike
The Horde Project
http://www.horde.org
https://www.facebook.com/hordeproject
https://www.twitter.com/hordeproject
Steffen
2014-06-24 14:37:26 UTC
Permalink
Post by Michael J Rubinsky
Post by Steffen
I'm using 2014-06-20's stable PEAR packages of Horde 5.
If I remove the user data with horde-remove-user-data, the user data in the
rampage tables are left untouched and there are entries imp:<user>: in
horde_histories still.
a) Would it make sense to call history->removeByParent("imp:<user>") in
removeUserData() of imp?
We don't remove history data for any other application. I would say we
shouldn't remove it for IMP either. For other apps, it's possible the data
could still be used for synchronization, for IMP even though this is not the
case, I could see it being used as some type of audit trail.
OK, understood.
I'm thinking about the data in this table for two reasons:
1a) For privacy purpose I'm entitled to give the data a "end of live",
once an user left the organisation and the account is deleted.
1b) The History grows, see message "horde_histories" by Pete from Feb 2014
http://thread.gmane.org/gmane.comp.horde.user/34294/focus=34297, which may
become a performance problem.

2) The data is required for sync'ing of (in the future) shared ressources.

I'll think about this issue again, probably once the remote access to
shared ressource works. :-)
Post by Michael J Rubinsky
Post by Steffen
d) horde_activesync_cache, horde_activesync_device_users
still contains entries with cache_user or device_user = <user>, the device
referenced here, is in horde_activesync_device and horde_activesync_state,
too.
http://bugs.horde.org/ticket/13277 -> orphan devices not removed
http://bugs.horde.org/ticket/13278 -> function call at wrong place
Correct.
Your changes work for me. Thanks.
Post by Michael J Rubinsky
Post by Steffen
e) the same for: horde_dav_collections
calendars a.s.o. deleted by the script are still listed
Neither deleteInternalCollectionId() nor deleteExternalCollectionId() from
/usr/share/php/Horde/Dav/Storage/Base.php are called anywhere in Horde it
seems. So cleanup is not implemented, yet?
f) imp_sentmail
has entries with sentmail_who = <user>
This table is self-cleaning, IIRC.
Ah, there is ./imp/lib/LoginTasks/SystemTask/GarbageCollection.php, which
triggers the cleaning of the table weekly, when an admin logs into IMP. I
didn't noticed this, yet.
--
Steffen
Continue reading on narkive:
Search results for '[horde] horde-remove-user-data leaves data of user in various tables' (Questions and Answers)
14
replies
villain cliches?
started 2007-10-02 16:30:00 UTC
gender studies
Loading...