Currently when purging dangling references from the log_action table, we lock it in order to make sure we don't accidentally delete a row that ends up being referenced during tracking. This is problematic, since purging log_action can take a long time, and blocks tracking while it is running.
The proposed solution is to remove the need for locking by:
ACTION_DELETED. the tracker cannot use an action whose type is
ACTION_DELETED. then running queries to delete all ACTION_DELETED actions.
Issues w/ concurrency must be reviewed carefully when implementing. Eg, we must ensure situations like the following do not occur: