User activity tracking should be transient by default

Bug #1570909 reported by Bill Erickson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Undecided
Unassigned
2.10
Won't Fix
Undecided
Unassigned
2.9
Won't Fix
Undecided
Unassigned

Bug Description

Evergreen circa 2.10 -- Affects all versions.

The config.usr_activity.transient column, which determines whether to keep all or only the most recent user activity entry (per activity type) should be set to true by default, so that only the most recent entry is retained.

For starters, we should default to collecting less patron data where feasible for patron privacy. Additionally, this table gets really big really fast if all event types are non-transient.

Revision history for this message
Kathy Lussier (klussier) wrote :

+1

Bill Erickson (berick)
Changed in evergreen:
assignee: nobody → Bill Erickson (berick)
Revision history for this message
Bill Erickson (berick) wrote :

Code pushed to change the default value for the transient column from FALSE to TRUE.

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/berick/lp1570909-usr-activity-transient

This branch (as is) only affects new installs. It does not modify activity types on existing systems. My concern here was that, depending on the size of the actor.usr_activity table, some manual data cleanup may be needed/preferred before toggling the transient value, since setting an activity type to transient could result in huge numbers of deletes in a short period of time.

Would it be helpful to have a tool (SQL script) to clean up the usr_activity table by deleting all but the most recent entry per user per activity type that people can run off-hours before modifying their transient settings?

Revision history for this message
Bill Erickson (berick) wrote :

Additional commits pushed:

1. Adds a new function for purging user activity rows by activity type, leaving the most recent row per user, consistent with transience.

2. pgtap test for the above.

3. release notes.

Changed in evergreen:
assignee: Bill Erickson (berick) → nobody
tags: added: pullrequest
Changed in evergreen:
milestone: none → 2.10.2
Revision history for this message
Bill Erickson (berick) wrote :

Adding pullrequest and targeting all active releases, since it only affects new installs, while providing tools to optionally affect existing installs.

Changed in evergreen:
milestone: 2.10.2 → 2.10.3
Changed in evergreen:
milestone: 2.10.3 → 2.10.4
Changed in evergreen:
milestone: 2.10.4 → 2.10.5
Changed in evergreen:
milestone: 2.10.5 → 2.10.6
Revision history for this message
Chris Sharp (chrissharp123) wrote :
tags: added: signedoff
Revision history for this message
Mike Rylander (mrylander) wrote :

Master has it now! I've decided against backporting this myself -- the db change pushed me over the line. If back-branch RMs feel differently, I leave it to them.

Thanks, Bill!

Changed in evergreen:
milestone: 2.10.6 → 2.11-beta
status: New → Fix Committed
Revision history for this message
Galen Charlton (gmc) wrote :

For my part, I've decided against backporting this to 2.10.

no longer affects: evergreen/2.8
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.