Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
If two submissions are saved in rapid successon, the simply_versioned gem can throw a unique constraint error when it tries to create new records. simply_versioned creates a new version of a record, which is numbered as simply (previous_version_number + 1). The version numbers must be unique. So, if two get started at the same time -- or almost the same time -- they can have the same number. The unique_constraint_retry method will retry whatever is in its block one time if there is a unique constraint error. Retrying one time should be enough for us to avoid this simply_versioned error that we're getting; in our logs, we rarely get more than one in a row. The stack traces show that it's happening in the broadcast_group_submission method. fixes INTEROP-8494 flag = none test plan: - specs pass Change-Id: I0fa67c9c766e98f27a29c83a45576b5900164ed9 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345096 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Ryan Hawkins <ryan.hawkins@instructure.com> QA-Review: Tucker Mcknight <tmcknight@instructure.com> Product-Review: Tucker Mcknight <tmcknight@instructure.com>
- Loading branch information