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

      $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();

            brendanheywood Brendan Heywood
            brendanheywood Brendan Heywood
            Matt Porritt Matt Porritt
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            CiBoT CiBoT
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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