Feature #19846


Stop doing costly Social Paper activity filters

Added by Boone Gorges 3 months ago. Updated 3 months ago.

Priority name:
Category name:
Social Paper
Target version:
Start date:
Due date:
% Done:


Estimated time:
Deployment actions:

Change all activity items to hide_sitewide=1:

UPDATE wp_bp_activity SET hide_sitewide = 1 WHERE type IN ('cacsp_paper_added_to_group', 'new_cacsp_comment', 'new_cacsp_edit', 'new_cacsp_paper')

then flush cache


social-paper involves some complex mods to the default activity queries:

As part of recent downtime debugging, we found that a number of these sorts of activity queries were showing up in the slow query log.

Since we no longer expose Papers on the site, we should stop doing this filtering for every activity query. We can't simply disable it, though. The purpose of the filter is to provide access protection for activity items belonging to non-public papers, and removing the filter would remove this access protection. As such, I have two suggestions:

1. We switch all social-paper activity to hide_sitewide=1. This should ensure that it's not improperly exposed to anyone. The problem is that this is pretty coarse, and it means that certain people who could previously see the activity items (such as collaborators) will no longer be able to, since we'll be falling back on BP's default show_hidden logic.
2. We delete all social-paper activity, or at least the subset that's non-public. This is more foolproof but is obviously even coarser than the previous choice.

No new paper activity has been recorded since 2018, so I'm not sure that it's going to make a noticeable difference either way. Ray, what do you think?


Also available in: Atom PDF