You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by ke...@apache.org on 2018/01/03 14:02:14 UTC

[1/2] allura git commit: Provide a good index for last_post queries, so mongo won't ever pick the 'timestamp' index which can be very slow

Repository: allura
Updated Branches:
  refs/heads/master 392c4819d -> 49a481847


Provide a good index for last_post queries, so mongo won't ever pick the 'timestamp' index which can be very slow


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/e6faf1b0
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/e6faf1b0
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/e6faf1b0

Branch: refs/heads/master
Commit: e6faf1b0efa08d8b88cc42c2d35339dcd4fa65d1
Parents: fd8533e
Author: Dave Brondsema <da...@brondsema.net>
Authored: Tue Jan 2 16:34:46 2018 -0500
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Tue Jan 2 16:34:58 2018 -0500

----------------------------------------------------------------------
 ForgeDiscussion/forgediscussion/model/forum.py | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/e6faf1b0/ForgeDiscussion/forgediscussion/model/forum.py
----------------------------------------------------------------------
diff --git a/ForgeDiscussion/forgediscussion/model/forum.py b/ForgeDiscussion/forgediscussion/model/forum.py
index bab3edf..f0e90c0 100644
--- a/ForgeDiscussion/forgediscussion/model/forum.py
+++ b/ForgeDiscussion/forgediscussion/model/forum.py
@@ -215,6 +215,11 @@ class ForumPost(M.Post):
         history_class = ForumPostHistory
         indexes = [
             'timestamp',  # for the posts_24hr site_stats query
+            (  # for last_post queries on thread listing page
+                'thread_id',
+                'deleted',
+                ('timestamp', pymongo.DESCENDING),
+            ),
         ]
     type_s = 'Post'
 
@@ -245,4 +250,5 @@ class ForumAttachment(M.DiscussionAttachment):
         polymorphic_identity = 'ForumAttachment'
     attachment_type = FieldProperty(str, if_missing='ForumAttachment')
 
+
 Mapper.compile_all()


[2/2] allura git commit: Merge commit 'e6faf1b0efa08d8b88cc42c2d35339dcd4fa65d1'

Posted by ke...@apache.org.
Merge commit 'e6faf1b0efa08d8b88cc42c2d35339dcd4fa65d1'


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/49a48184
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/49a48184
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/49a48184

Branch: refs/heads/master
Commit: 49a48184781e4cdbf31097757b84d46ec6a25e72
Parents: 392c481 e6faf1b
Author: Kenton Taylor <kt...@slashdotmedia.com>
Authored: Wed Jan 3 13:58:33 2018 +0000
Committer: Kenton Taylor <kt...@slashdotmedia.com>
Committed: Wed Jan 3 13:58:33 2018 +0000

----------------------------------------------------------------------
 ForgeDiscussion/forgediscussion/model/forum.py | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------