4 Commits

Author SHA1 Message Date
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