Akkoma stable 2023.03 - recently drafted purge requests

Short answer: No, but that’s not really relevant for activities, only for (non-activity) objects.

Long answer:
It’s a bit technical, but I think it’s important to understand the difference between Object and Activity here (well, technically speaking Activities are also Objects, but let’s ignore that for now).

When we talk about objects in the context of this pruner, we talk about things like Note, Article, Question… These are what you see as “posts” on your timeline.

Activities are things that act on these objects. Create, Like (ie favourite) , Announce (ie repeat), Answer (ie vote on a poll), Flag (ie report a post)…

The prune task prunes objects. But this new parameter allows you to also remove what I call “orphaned activities”, which are just activities without corresponding objects.

For example, if someone on a remote instance made a post, that will result in a Create activity and a Note object. If you favourite that post, it will result in a Like activity referencing that Note. When the Note is deleted (maybe you pruned it, maybe the person who made the note deleted it, etc.), the Note object will be gone.

So now the reasoning is that, at this point, the activities on this object aren’t relevant any more, since they act on an object that doesn’t exist. So the --prune-orphaned-activities option will delete them. It doesn’t differentiate between local or remote, because that’s not really relevant here.

To go a bit further:
Local vs remote is relevant, however, for pruning objects. If you want to keep your local activities, then it makes sense that you want to keep the corresponding objects as well. In that case, you can use the --keep-threads option. This will keep the objects that are part of a thread that have local activities on them.

To give an example:
Let’s say someone remote made a post and you favourite it.

When you prune the objects with ./bin/pleroma_ctl database prune_objects --prune-orphaned-activities, it will delete that post, and the --prune-orphaned-activities option will then cause your favourite to also be deleted.

When you prune the objects with ./bin/pleroma_ctl database prune_objects --keep-threads --prune-orphaned-activities, it will see that the post has local interaction, and thus keep the post. The --prune-orphaned-activities option will keep your favourite because the corresponding object wasn’t deleted. (Unless the post was deleted in another way ofc, then the object won’t exist any more either, and thus the favourite will still be removed from the database.)

Personally I run prune_objects with both the --keep-threads and --prune-orphaned-activities options on a weekly basis.

3 Likes