{"action":"created","issue":{"url":"https://api.github.com/repos/edx/edx-platform/issues/11569","repository_url":"https://api.github.com/repos/edx/edx-platform","labels_url":"https://api.github.com/repos/edx/edx-platform/issues/11569/labels{/name}","comments_url":"https://api.github.com/repos/edx/edx-platform/issues/11569/comments","events_url":"https://api.github.com/repos/edx/edx-platform/issues/11569/events","html_url":"https://github.com/edx/edx-platform/pull/11569","id":134373821,"number":11569,"title":"Student Module History Extension","user":{"login":"jibsheet","id":57604,"avatar_url":"https://avatars.githubusercontent.com/u/57604?v=3","gravatar_id":"","url":"https://api.github.com/users/jibsheet","html_url":"https://github.com/jibsheet","followers_url":"https://api.github.com/users/jibsheet/followers","following_url":"https://api.github.com/users/jibsheet/following{/other_user}","gists_url":"https://api.github.com/users/jibsheet/gists{/gist_id}","starred_url":"https://api.github.com/users/jibsheet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jibsheet/subscriptions","organizations_url":"https://api.github.com/users/jibsheet/orgs","repos_url":"https://api.github.com/users/jibsheet/repos","events_url":"https://api.github.com/users/jibsheet/events{/privacy}","received_events_url":"https://api.github.com/users/jibsheet/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2016-02-17T19:20:38Z","updated_at":"2016-02-29T20:09:54Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/11569","html_url":"https://github.com/edx/edx-platform/pull/11569","diff_url":"https://github.com/edx/edx-platform/pull/11569.diff","patch_url":"https://github.com/edx/edx-platform/pull/11569.patch"},"body":"This PR implements a 2 database solution for our \"running out of primary keys in courseware_studentmodulehistory\" problem.  Original code by Cale, further work primarily by me with a little other devops assistance along the way.\r\n\r\nIt creates a second student_module_history database which contains 2 tables - django_migrations and coursewarehistoryextended_studentmodulehistorytextended.\r\n\r\nOur cutover notes and data migration plans are here\r\nhttps://openedx.atlassian.net/wiki/display/EdxOps/Courseware+Student+Module+History+Migrations\r\n\r\nThere are two feature flags in this code.  ENABLE_CSMH_EXTENDED to prevent the migration/go live from running until we have migrated sandboxes/devstacks to two databases and have scheduled the cutover.  After which point it will be removed from the code (along with the code in StudentModuleHistory controlled by it).  ENABLE_READING_FROM_MULTIPLE_HISTORY_TABLES exists as our backwards compatible flag that allows open source users to have both a courseware_studentmodulehistory and coursewarehistoryextended_studentmodulehistoryextended table and we will just search both when showing submissions.  For edx.org and edge.edx.org we will be consolidating all data into the new table and truncating the old table and then flipping that flag for multiple perf reasons.\r\n\r\nOn the test front - I've updated lettuce and bok choy to have two databases cached and unit tests stand up both databases before running.  I'll be asking Jay and Ben to review that code specifically."},"comment":{"url":"https://api.github.com/repos/edx/edx-platform/issues/comments/190362241","html_url":"https://github.com/edx/edx-platform/pull/11569#issuecomment-190362241","issue_url":"https://api.github.com/repos/edx/edx-platform/issues/11569","id":190362241,"user":{"login":"jibsheet","id":57604,"avatar_url":"https://avatars.githubusercontent.com/u/57604?v=3","gravatar_id":"","url":"https://api.github.com/users/jibsheet","html_url":"https://github.com/jibsheet","followers_url":"https://api.github.com/users/jibsheet/followers","following_url":"https://api.github.com/users/jibsheet/following{/other_user}","gists_url":"https://api.github.com/users/jibsheet/gists{/gist_id}","starred_url":"https://api.github.com/users/jibsheet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jibsheet/subscriptions","organizations_url":"https://api.github.com/users/jibsheet/orgs","repos_url":"https://api.github.com/users/jibsheet/repos","events_url":"https://api.github.com/users/jibsheet/events{/privacy}","received_events_url":"https://api.github.com/users/jibsheet/received_events","type":"User","site_admin":false},"created_at":"2016-02-29T20:09:54Z","updated_at":"2016-02-29T20:09:54Z","body":"jenkins run bokchoy"}}