Fix indexing error that sometimes occurs when deleting users

Description

When a user is deleted around the time that one of its pseuds is being reindexed, the indexing code will sometimes load the pseud, but not be able to find the corresponding user. (They're both deleted in the same transaction, but the pseud is loaded before the user.) This results in a Module::DelegationError when calling user_login to generate the pseud's search document.

Testing Instructions: This is an intermittent bug, so I'm not sure it can be consistently replicated. Probably the best policy with this is to deploy it, and check Resque a few days later to see if the error is still happening.

Activity

Show:
redsummernight
January 24, 2021, 10:43 AM

We cleared out all Resque failures on 2021-01-16 and waited a week. No such indexing errors reappeared so far. Looks good.

Done

Assignee

ticking instant

Reporter

ticking instant

Roadmap

Users

Priority

Medium

Affects versions

Fix versions

Components

BackEnd

Difficulty

Medium

Milestone

Internal 0.9