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

Guess last access record is being updated when autologged in.. can lead to contention

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.5, 2.3.1, 2.4
    • Fix Version/s: 2.2.6, 2.3.3
    • Component/s: Performance
    • Labels:
    • Testing Instructions:
      Hide
      • Install Moodle 2.3
      • Create a course, set 'allow guest access' to yes
      • Add a forum to the course
      • In Admin > Users > Permissions > User Policies, switch on 'autologinguests'
      • Put the attached 'testguest.php' file in your moodle directory
      • Run testguest.php and note the various times.

      Open a new incognito browser (something not logged into your moodle):

      • Visit your moodle site
      • Click onto the course

      In your admin user browser:

      • Run testguest.php again and verify the various times have not changed

      In your inconginto browser:

      • Wait 60 seconds, then click around the course

      In your admin user browser:

      • Run testguest.php again and verify the various times have not changed
      Show
      Install Moodle 2.3 Create a course, set 'allow guest access' to yes Add a forum to the course In Admin > Users > Permissions > User Policies, switch on 'autologinguests' Put the attached 'testguest.php' file in your moodle directory Run testguest.php and note the various times. Open a new incognito browser (something not logged into your moodle): Visit your moodle site Click onto the course In your admin user browser: Run testguest.php again and verify the various times have not changed In your inconginto browser: Wait 60 seconds, then click around the course In your admin user browser: Run testguest.php again and verify the various times have not changed
    • Affected Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull Master Branch:
      MDL-35257-master

      Description

      On moodle.org, we are seeing high contention on the guest record causing lock timeouts.

      user_accesstime_log() does do nothing if the user is '!isloggedin()', but I suppose that when a guest is auto logged in then this doesn't apply.

      I think we should just check for the guest user and not update these fields if guest.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    12/Nov/12