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

Implement a Lock API factory using Mysql / MariaDB

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Covered by the same unit tests as all other locks.

      1) Setup mysql

       2) Run unit tests

      $ vendor/bin/phpunit lib/tests/lock_test.php
      Moodle 3.9dev (Build: 20200124), 262061d661b12c344557d8e426f58cefc22b203b
      Php: 7.2.24.0.0.18.04.2, mysqli: 5.7.29-0ubuntu0.18.04.1, OS: Linux 5.0.0-37-generic x86_64
      PHPUnit 7.5.18 by Sebastian Bergmann and contributors.

      . 1 / 1 (100%)

      Time: 3.73 seconds, Memory: 56.25 MB

      OK (1 test, 33 assertions)

       

      3) Rinse and repeat with Maria

       

      Show
      Covered by the same unit tests as all other locks. 1) Setup mysql  2) Run unit tests $ vendor/bin/phpunit lib/tests/lock_test.php Moodle 3.9dev (Build: 20200124), 262061d661b12c344557d8e426f58cefc22b203b Php: 7.2.24.0.0.18.04.2, mysqli: 5.7.29-0ubuntu0.18.04.1, OS: Linux 5.0.0-37-generic x86_64 PHPUnit 7.5.18 by Sebastian Bergmann and contributors. . 1 / 1 (100%) Time: 3.73 seconds, Memory: 56.25 MB OK (1 test, 33 assertions)   3) Rinse and repeat with Maria  
    • Affected Branches:
      MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_39_STABLE
    • Pull Master Branch:
      MDL-67052-mysql-locks

      Description

      On mysql on really big sites you don't want to use file locking, and the db_record_lock_factory has some weird edge cases. We need a good default high performance lock implementation.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              brendanheywood Brendan Heywood
              Reporter:
              brendanheywood Brendan Heywood
              Peer reviewer:
              Matteo Scaramuccia
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              CiBoT
              Participants:
              Component watchers:
              Matteo Scaramuccia, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                15/Jun/20

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 45 minutes
                  45m