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

DB and Postgress lock implementations do not correctly namespace resource key resulting in lock clashes

    XMLWordPrintable

Details

    Description

      $modassignfactory = new $lockfactoryclass('mod_assign');
      $tooltaskfactory = new $lockfactoryclass('tool_task');

      // Test for lock clashes between lock stores.
      $assignlock = $modassignfactory->get_lock('abc1', 0);
      $this->assertNotEmpty($assignlock, 'Get a lock "abc" from store "mod_assign"');

      $tasklock = $tooltaskfactory->get_lock('abc1', 0);
      $this->assertNotEmpty($tasklock, 'Get a lock "abc" from store "tool_task"');

      $assignlock->release();
      $tasklock->release();

      Attachments

        Issue Links

          Activity

            People

              brendanheywood Brendan Heywood
              brendanheywood Brendan Heywood
              Matt Porritt Matt Porritt
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              CiBoT CiBoT
              Matteo Scaramuccia, Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              3 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                11/Nov/19

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 50 minutes
                  1h 50m