Files
edx-platform/lms/djangoapps/instructor_task
Eric Fischer 731d85f771 CohortMembership Transaction Fixes
An issue arose recently due to ATOMIC_REQUESTS being turned on by default. It
turns out that CohortMemberships had been somewhat relying on the old default
transaction handling in order to keep CohortMemberships and the underlying
CourseUserGroup.users values in-sync.

To fix this, I've made all updates to Cohortmemberships go through an
outer_atomic(read_committed=True) block. This, is conjunction with the already
present select_for_update(), will no longer allow 2 simultaneous requests to
modify objects in memory without sharing them. Only one process will be
touching a given CohortMembership at any given time, and all changes will be
immediately comitted to the database, where the other process will see them.

I've also included some changes to get_cohort(), add_user_to_cohort(), and
remove_user_from_cohort() in order to properly make use of the new
CohortMembership system.
2015-12-02 15:03:28 -05:00
..
2015-11-22 07:41:19 -05:00
2015-11-22 07:41:19 -05:00
2015-11-10 15:00:19 -05:00
2015-11-10 15:00:19 -05:00
2015-11-22 07:41:19 -05:00