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

Implement a Lock API factory using Mysql / MariaDB

    XMLWordPrintable

Details

    • MOODLE_39_STABLE
    • MOODLE_39_STABLE
    • MDL-67052-mysql-locks
    • 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  

    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

              brendanheywood Brendan Heywood
              brendanheywood Brendan Heywood
              Matteo Scaramuccia Matteo Scaramuccia
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              CiBoT CiBoT
              Matteo Scaramuccia, Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                15/Jun/20

                Time Tracking

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