You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2013/06/21 23:34:20 UTC

[08/38] git commit: [#6347] update index hint to match the index change

[#6347] update index hint to match the index change


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

Branch: refs/heads/cj/6272
Commit: 167fa54b64e3c5bba75a2ac7034b973011735676
Parents: b7a01fb
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Thu Jun 13 22:20:46 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Thu Jun 13 22:20:46 2013 +0000

----------------------------------------------------------------------
 Allura/allura/model/discuss.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/167fa54b/Allura/allura/model/discuss.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/discuss.py b/Allura/allura/model/discuss.py
index b316d99..9728994 100644
--- a/Allura/allura/model/discuss.py
+++ b/Allura/allura/model/discuss.py
@@ -95,7 +95,7 @@ class Discussion(Artifact, ActivityObject):
                 discussion_id=self._id))\
             .sort('timestamp', pymongo.DESCENDING)\
             .limit(1)\
-            .hint([('discussion_id', pymongo.ASCENDING)])
+            .hint([('discussion_id', pymongo.ASCENDING), ('status', pymongo.ASCENDING)])
             # hint is to try to force the index to be used, since mongo wouldn't select it sometimes
             # https://groups.google.com/forum/#!topic/mongodb-user/0TEqPfXxQU8
         return q.first()