From 523d479ce040ce229eebbcd085abfa9e2f4fa897 Mon Sep 17 00:00:00 2001 From: Tyler Hallada Date: Fri, 9 Feb 2018 14:18:20 -0500 Subject: [PATCH] Temporarily comment bad index in ensure_indexes --- .../lib/xmodule/xmodule/contentstore/mongo.py | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/common/lib/xmodule/xmodule/contentstore/mongo.py b/common/lib/xmodule/xmodule/contentstore/mongo.py index a5dc00c9b8..a51bbbf20c 100644 --- a/common/lib/xmodule/xmodule/contentstore/mongo.py +++ b/common/lib/xmodule/xmodule/contentstore/mongo.py @@ -475,17 +475,18 @@ class MongoContentStore(ContentStore): def ensure_indexes(self): # Index needed thru 'category' by `_get_all_content_for_course` and others. That query also takes a sort # which can be `uploadDate`, `displayname`, - create_collection_index( - self.fs_files, - [ - ('_id.tag', pymongo.ASCENDING), - ('_id.org', pymongo.ASCENDING), - ('_id.course', pymongo.ASCENDING), - ('_id.category', pymongo.ASCENDING) - ], - sparse=True, - background=True - ) + # TODO: uncomment this line once this index in prod is cleaned up. See OPS-2863 for tracking clean up. + # create_collection_index( + # self.fs_files, + # [ + # ('_id.tag', pymongo.ASCENDING), + # ('_id.org', pymongo.ASCENDING), + # ('_id.course', pymongo.ASCENDING), + # ('_id.category', pymongo.ASCENDING) + # ], + # sparse=True, + # background=True + # ) create_collection_index( self.fs_files, [