Decide whether to store user mentions in the database for commits
The following discussion from !63040 (merged) should be addressed:
-
@nick.thomas started a discussion: Previously, we never reached here for
Commit
, becauseupdated_cached_html_for
was never called with an attribute handled bycache_markdown_field
. That's no longer the case, so we need to either make this code work, or continue skipping execution.We know that there are no other non-
ApplicationRecord
models relying on this code because below we haveself.class.safe_ensure_unique
- a method implemented byApplicationRecord
.We can make this work, but this method is a rich source of N+1s when rendering a collection of commits, as we do when displaying search results, so I decided we should push it to a follow-up; it's not the focus of this MR.
Illustrated in this MR: !63401 (closed)
@acroitor suggested we might want to remove notes on commits entirely, which would imply not doing this.