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

              • Assignee:
                brendanheywood Brendan Heywood
                Reporter:
                brendanheywood Brendan Heywood
                Peer reviewer:
                Matt Porritt
                Integrator:
                Eloy Lafuente (stronk7)
                Tester:
                CiBoT
                Participants:
                Component watchers:
                Matteo Scaramuccia, Jake Dallimore, Jun Pataleta, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              • Votes:
                3 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  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