Skip to content

Commit

Permalink
Revert "feat: store split modulestore's course indexes in Django/MySQL"
Browse files Browse the repository at this point in the history
This reverts commit 96e5ff8.
  • Loading branch information
David Ormsbee committed Oct 7, 2021
1 parent da2bae2 commit ae124bd
Show file tree
Hide file tree
Showing 52 changed files with 207 additions and 731 deletions.
2 changes: 1 addition & 1 deletion cms/djangoapps/contentstore/tests/test_clone_course.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def test_rerun_course(self):
)

# try to hit the generic exception catch
with patch('xmodule.modulestore.split_mongo.mongo_connection.MongoPersistenceBackend.insert_course_index', Mock(side_effect=Exception)): # lint-amnesty, pylint: disable=line-too-long
with patch('xmodule.modulestore.split_mongo.mongo_connection.MongoConnection.insert_course_index', Mock(side_effect=Exception)): # lint-amnesty, pylint: disable=line-too-long
split_course4_id = CourseLocator(org="edx3", course="split3", run="rerun_fail")
fields = {'display_name': 'total failure'}
CourseRerunState.objects.initiated(split_course3_id, split_course4_id, self.user, fields['display_name'])
Expand Down
10 changes: 5 additions & 5 deletions cms/djangoapps/contentstore/tests/test_course_listing.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ def test_courses_list_with_ccx_courses(self):
self.assertEqual(len(list(courses_iter)), 0)

@ddt.data(
(ModuleStoreEnum.Type.split, 2),
(ModuleStoreEnum.Type.mongo, 1)
(ModuleStoreEnum.Type.split, 3),
(ModuleStoreEnum.Type.mongo, 2)
)
@ddt.unpack
def test_staff_course_listing(self, default_store, mongo_calls):
Expand Down Expand Up @@ -239,8 +239,8 @@ def test_get_course_list_with_invalid_course_location(self, store):
)

@ddt.data(
(ModuleStoreEnum.Type.split, 2, 2),
(ModuleStoreEnum.Type.mongo, 1, 1)
(ModuleStoreEnum.Type.split, 3, 3),
(ModuleStoreEnum.Type.mongo, 2, 2)
)
@ddt.unpack
def test_course_listing_performance(self, store, courses_list_from_group_calls, courses_list_calls):
Expand Down Expand Up @@ -289,7 +289,7 @@ def test_course_listing_performance(self, store, courses_list_from_group_calls,
# Calls:
# 1) query old mongo
# 2) get_more on old mongo
# 3) query split (handled with MySQL only)
# 3) query split (but no courses so no fetching of data)

@ddt.data(ModuleStoreEnum.Type.split, ModuleStoreEnum.Type.mongo)
def test_course_listing_errored_deleted_courses(self, store):
Expand Down
2 changes: 1 addition & 1 deletion cms/djangoapps/contentstore/tests/test_orphan.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def test_get_orphans(self, default_store):
self.assertIn(str(location), orphans)

@ddt.data(
(ModuleStoreEnum.Type.split, 5, 3),
(ModuleStoreEnum.Type.split, 9, 5),
(ModuleStoreEnum.Type.mongo, 34, 12),
)
@ddt.unpack
Expand Down
12 changes: 6 additions & 6 deletions cms/djangoapps/contentstore/views/tests/test_course_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,13 +391,13 @@ def check_index_page(self, separate_archived_courses, org):

@ddt.data(
# Staff user has course staff access
(True, 'staff', None, 1, 20),
(False, 'staff', None, 1, 20),
(True, 'staff', None, 3, 18),
(False, 'staff', None, 3, 18),
# Base user has global staff access
(True, 'user', ORG, 1, 20),
(False, 'user', ORG, 1, 20),
(True, 'user', None, 1, 20),
(False, 'user', None, 1, 20),
(True, 'user', ORG, 3, 18),
(False, 'user', ORG, 3, 18),
(True, 'user', None, 3, 18),
(False, 'user', None, 3, 18),
)
@ddt.unpack
def test_separate_archived_courses(self, separate_archived_courses, username, org, mongo_queries, sql_queries):
Expand Down
2 changes: 1 addition & 1 deletion cms/djangoapps/contentstore/views/tests/test_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -2528,7 +2528,7 @@ def test_json_responses(self):
self.validate_course_xblock_info(json_response, course_outline=True)

@ddt.data(
(ModuleStoreEnum.Type.split, 3, 3),
(ModuleStoreEnum.Type.split, 4, 4),
(ModuleStoreEnum.Type.mongo, 5, 7),
)
@ddt.unpack
Expand Down
1 change: 0 additions & 1 deletion cms/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -1456,7 +1456,6 @@

# For CMS
'cms.djangoapps.contentstore.apps.ContentstoreConfig',
'common.djangoapps.split_modulestore_django.apps.SplitModulestoreDjangoBackendAppConfig',

'openedx.core.djangoapps.contentserver',
'cms.djangoapps.course_creators',
Expand Down
Empty file.
18 changes: 0 additions & 18 deletions common/djangoapps/split_modulestore_django/admin.py

This file was deleted.

12 changes: 0 additions & 12 deletions common/djangoapps/split_modulestore_django/apps.py

This file was deleted.

This file was deleted.

This file was deleted.

Empty file.
164 changes: 0 additions & 164 deletions common/djangoapps/split_modulestore_django/models.py

This file was deleted.

Loading

0 comments on commit ae124bd

Please sign in to comment.