feat: Read course indexes from MySQL, not MongoDB (#29184)

Description
This is a follow up to #29058 and #29413. This is the next step in moving part of the modulestore data (the course indexes / "active versions" table) from MongoDB to MySQL.

There are four steps planned in moving course index data to MySQL:

Step 1: create the tables in MySQL, start writing to MySQL + MongoDB  done
Step 2: migrate all remaining courses to MySQL  done
Step 3: switch reads from MongoDB to MySQL (this PR)
Step 4 (much later, once we know this is working well): stop writing to MongoDB altogether.
Supporting information
OpenCraft Jira ticket: MNG-2557

Status
 Tested with a large Open edX instance is in progress.

Testing instructions
Try making changes in Studio and verify that they work fine.

Deadline
None
This commit is contained in:
Braden MacDonald
2022-03-09 07:21:09 -08:00
committed by GitHub
parent 835285d494
commit dcb7ef8821
34 changed files with 145 additions and 169 deletions

View File

@@ -371,7 +371,7 @@ class TestInstructorGradeReport(InstructorGradeReportTestCase):
@ddt.data(
(ModuleStoreEnum.Type.mongo, 4, 47),
(ModuleStoreEnum.Type.split, 3, 47),
(ModuleStoreEnum.Type.split, 2, 48),
)
@ddt.unpack
def test_query_counts(self, store_type, mongo_count, expected_query_count):