Commit Graph

25 Commits

Author SHA1 Message Date
Marina Glancy
8fc1486d36 MDL-77164 various: fix incorrect phpdocs 2023-04-13 11:35:06 +01:00
Meirza
e2cd808b34 MDL-76415 core: Fixed ${var} string interpolation deprecations.
Since PHP 8.2, placing the dollar sign outside the curly brace is deprecated when
the expression inside the braces resolves to a variable or an expression.
2023-02-13 19:51:46 +07:00
Jonathan Champ
33e3af1899 MDL-76506 core\lock: Fix MDL_PERF and perfdebug checks 2022-11-28 18:53:44 -05:00
Mark Johnson
045ee091da MDL-67020 Cache: Make locking work for local file caches
* Add new requirelockingbeforewrite flag for cache definitions
* Implement native locking in cachestore_file (leveraging
file_lock_factory).
2022-10-20 11:31:33 +01:00
sam marshall
81b4f04fb3 MDL-74960 core\lock: Performance info - display lock performance
Show performance information about locks (time taken to acquire lock,
time lock is held for) in the 'perfinfo' display.

Also show existing information (that was already calculated but not
shown before) about the session lock, which is not a 'core\lock' type
lock, but the information is similarly useful.
2022-09-26 11:24:10 +01:00
Eloy Lafuente (stronk7)
6a60111199 MDL-69521 core: Move all comments in code from 4.0 to 3.10 2020-09-06 17:00:25 +02:00
Mihail Geshoski
83c18a2dec MDL-67594 core_lock: Modify postgres get_lock() to avoid recursion 2020-07-06 13:04:41 +08:00
Mihail Geshoski
566b73fbfc MDL-67594 core_lock: Deprecate extend() 2020-07-06 13:04:33 +08:00
Mihail Geshoski
80736a93aa MDL-67594 core_lock: Deprecate extend_lock() 2020-07-06 13:03:08 +08:00
Mihail Geshoski
4b71cdcd89 MDL-67594 core_lock: Deprecate supports_recursion() 2020-07-06 13:01:16 +08:00
Eloy Lafuente (stronk7)
fbde0a7798 Merge branch 'MDL-67052-mysql-locks' of https://github.com/brendanheywood/moodle 2020-02-03 19:32:58 +01:00
Brendan Heywood
262061d661 MDL-67052 locks: Added a native MySQL / MariaDB lock implementation 2020-01-30 09:20:10 +11:00
Brendan Heywood
cdf3fe7b7e MDL-65722 core_lock: Avoid DB calls in postgres lock by using a hash 2019-12-11 12:49:03 +11:00
Brendan Heywood
7e086935e3 MDL-66935 core_lock: Fix resource key clashes in db and postgres locks 2019-10-24 15:04:56 +11:00
Matteo Scaramuccia
c7321899c9 MDL-61038 setuplib: Fixed PECL UUID extension support
generate_uuid() has been refactored into \core\uuid::generate()
2019-06-09 23:24:26 +02:00
Brendan Heywood
ecbe920656 MDL-65072 core_lock: Locks with a zero timeout return asap 2019-03-26 14:29:16 +11:00
Andrew Nicols
5bc4c797a7 MDL-59506 core_lock: use a null lock during install
Use a different lock factory during installation which does not actually
lock at all.
2017-08-07 09:59:44 +08:00
Dan Poltawski
e4d6ab3bde Merge branch 'MDL-49747-task-error-improvement' of https://github.com/brendanheywood/moodle 2015-04-07 16:13:46 +01:00
Brendan Heywood
894f36abf9 MDL-49740 Lock: Fixed task lock release bugs 2015-04-03 11:13:03 +11:00
Brendan Heywood
e8a1c3e908 MDL-49747 Task: Improve coding error expection message 2015-04-03 11:11:51 +11:00
Andrew Nicols
ad3532dea1 MDL-44874 core: Move uuid generation to setuplib 2015-03-30 11:42:14 +08:00
Damyon Wiese
37b2c56569 MDL-25500 Lock: Unit tests have found that MySQL locks are broken
Removing the MySQL lock factory, the only safe way to use this MySQL API
would be to open a new DB connection for every lock. Record locking is a decent
fallback.
2014-01-29 11:52:51 +08:00
Sam Hemelryk
34027f1563 MDL-25500 lock: post integration trivial cleanup
* A couple of misc comment typo's
* Added missing $CFG required global in file_lock_factory::is_available
* Removed unused $CFG global from file_lock_factory::get_lock
* A couple of trivial phpdoc tweaks
* Removed unused $DB global from postgres_lock_factory::get_index_from_key
* Added global namespace \ to exceptions in get_index_from_key (tested and found they didn't resolve)
2014-01-29 13:22:16 +13:00
Damyon Wiese
d551112566 MDL-25500 Lock: Do not use file locking if $CFG->preventfilelocking is set
(And file_lock_dir is not prefixed with the dataroot).
2014-01-28 20:14:05 +08:00
Damyon Wiese
9843e5ece5 MDL-25500 lock: New locking framework.
This locking system is designed to be used everywhere requiring
locking in Moodle. Each use of the locking system can be configured
to use a different type of locking (or the same type with a different
configuration).

The first supported lock types are memcache, memcached, file (flock),
db (specific handlers for pg, mysql and mariadb).
2014-01-27 10:04:18 +08:00