2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00

PERF: deleting a post in huge topics was timing out

- add missing index to user actions for fast retrieval by post
- add missing indexes to users for fast retrieval of staff
- only refresh topic_users liked/bookmarked cache for affected users
This commit is contained in:
Sam 2015-06-18 09:58:32 +10:00
parent 9cdfef2b27
commit 1343d40558
4 changed files with 20 additions and 1 deletions

View file

@ -90,7 +90,7 @@ class PostDestroyer
end
update_associated_category_latest_topic
update_user_counts
TopicUser.update_post_action_cache(topic_id: @post.topic_id)
TopicUser.update_post_action_cache(post_id: @post.id)
end
feature_users_in_the_topic if @post.topic