Using entity to update alerts_unviewed and alerts_unread can have a data race condition on marking an alert read/unread and new alerts being given to the $alert->Receiver.
First time I've ever seen this error. Probably some fluke thing. Only 1 error. LogicException: Attempted to set 'alerts_unviewed' while a save was pending without forceSet src/XF/Mvc/Entity/Entity.php:594