diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-27 00:08:38 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-27 00:08:38 +0300 |
commit | 936d15143b786f841bf0ee8e2458215ee010f33e (patch) | |
tree | f850c872c4d0328358ebdec10a343e8c63e519ce /lib/gitlab/markdown_cache | |
parent | f57f1c6cd8a89454bb8a4a1b965738dcc8007d5d (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/markdown_cache')
-rw-r--r-- | lib/gitlab/markdown_cache/active_record/extension.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gitlab/markdown_cache/active_record/extension.rb b/lib/gitlab/markdown_cache/active_record/extension.rb index 1de890c84f9..af94884f1a7 100644 --- a/lib/gitlab/markdown_cache/active_record/extension.rb +++ b/lib/gitlab/markdown_cache/active_record/extension.rb @@ -10,7 +10,9 @@ module Gitlab # Using before_update here conflicts with elasticsearch-model somehow before_create :refresh_markdown_cache, if: :invalidated_markdown_cache? before_update :refresh_markdown_cache, if: :invalidated_markdown_cache? - after_save :store_mentions!, if: :mentionable_attributes_changed? + # The import case needs to be fixed to avoid large number of + # SQL queries: https://gitlab.com/gitlab-org/gitlab/-/issues/21801 + after_save :store_mentions!, if: :mentionable_attributes_changed?, unless: ->(obj) { obj.is_a?(Importable) && obj.importing? } end # Always exclude _html fields from attributes (including serialization). |