Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-70095

Potential race condition cause confusing database error

    XMLWordPrintable

    Details

      Description

      In version 25, I add a sleep before the user record insertion in user/editadvanced.php file. When concurrent requests in two browsers happen on the web page by clicking User -> Accounts -> Add a new user, and enter same user infomation and click create user. On one page, a database error is shown. The error is confusing as the user is created in the table. We could catch the error and handles it by checking if the record exists in the table, and do not report the error if the record exists.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            Case_qiu CaseKK
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: