After deleting a user, it's observed that mentions contained in comments in the #all-updates view still exist with the original user name intact and there is an additional comment created that contains a key instead of the anonymised username:
- Comment on a page and mention a user
- Delete that user
- Comment in Dashboard > All updates view contains user name and duplicate comment
This bug only appears when the content in #all-updates belongs to the user being deleted. All-updates relies on change documents in lucene. As part of reindexing content with user mentions, we also reindex change documents, which involves first looking up the original change document for a given content object, deleting it, and then adding a new change document for the same content object. Unfortunately, looking up the original change document relies on the username. By the time, we try and look up the original change document, the user has already been renamed, so we don't find the original, but we do add a new one, resulting in duplication.
Perform a site reindex to remove the duplicates. Or, create more than 40 new changes, which will push the duplicate entry out of the all-updates tab.