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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.2.6, 2.3.3
    • 2.2.5, 2.3.1, 2.4
    • Performance
    • MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • MOODLE_22_STABLE, MOODLE_23_STABLE
    • MDL-35257-master
    • 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

      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.

            poltawski Dan Poltawski
            poltawski Dan Poltawski
            Frédéric Massart Frédéric Massart
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.