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

Improve the requirelockingwrite deprecation error message

XMLWordPrintable

    • MOODLE_403_STABLE
    • MOODLE_403_STABLE
    • MDL-79150-requirelockingwrite
    • Hide

      1) Hack a lib/db/caches.php like this:

      diff --git a/lib/db/caches.php b/lib/db/caches.php
      index eb9ccdc7ea1..77e117a589f 100644
      --- a/lib/db/caches.php
      +++ b/lib/db/caches.php
      @@ -118,7 +118,8 @@ $definitions = array(
           'config' => array(
               'mode' => cache_store::MODE_APPLICATION,
               'staticacceleration' => true,
      -        'simpledata' => true
      +        'simpledata' => true,
      +        'requirelockingwrite' => true,
           ),
       
           // Groupings belonging to a course. 

      2) Make sure debugging is on

      2) Now run a cli and confirm that the error shows 'core:config' in the error message

      php admin/cli/cfg.php --name=wwwroot
      ++ The cache option requirelockingwrite is deprecated and now has no effect. Consider removing the option, or using requirelockingbeforewrite for the core:config definition ++
      * line 387 of /cache/classes/definition.php: call to debugging()
      * line 470 of /cache/classes/factory.php: call to cache_definition::load()
      * line 210 of /cache/classes/factory.php: call to cache_factory->create_definition()
      * line 200 of /cache/classes/loaders.php: call to cache_factory->create_cache_from_definition()
      * line 1551 of /lib/moodlelib.php: call to cache::make()
      * line 773 of /lib/setuplib.php: call to get_config()
      * line 699 of /lib/setup.php: call to initialise_cfg()
      * line 217 of /config.php: call to require_once()
      * line 31 of /admin/cli/cfg.php: call to require()
      https://master.localhost

      Show
      1) Hack a lib/db/caches.php like this: diff --git a/lib/db/caches.php b/lib/db/caches.php index eb9ccdc7ea1..77e117a589f 100644 --- a/lib/db/caches.php +++ b/lib/db/caches.php @@ - 118 , 7 + 118 , 8 @@ $definitions = array(       'config' => array(           'mode' => cache_store::MODE_APPLICATION,           'staticacceleration' => true , -         'simpledata' => true +         'simpledata' => true , +         'requirelockingwrite' => true ,      ),         // Groupings belonging to a course. 2) Make sure debugging is on 2) Now run a cli and confirm that the error shows 'core:config' in the error message php admin/cli/cfg.php --name=wwwroot ++ The cache option requirelockingwrite is deprecated and now has no effect. Consider removing the option, or using requirelockingbeforewrite for the core:config definition ++ * line 387 of /cache/classes/definition.php: call to debugging() * line 470 of /cache/classes/factory.php: call to cache_definition::load() * line 210 of /cache/classes/factory.php: call to cache_factory->create_definition() * line 200 of /cache/classes/loaders.php: call to cache_factory->create_cache_from_definition() * line 1551 of /lib/moodlelib.php: call to cache::make() * line 773 of /lib/setuplib.php: call to get_config() * line 699 of /lib/setup.php: call to initialise_cfg() * line 217 of /config.php: call to require_once() * line 31 of /admin/cli/cfg.php: call to require() https: //master.localhost

      This was removed in MDL-78109 and an error message added, but in practice this message pops up in weird places like unit tests and doesn't give you any pointers as to what is wrong.

      The cache option requirelockingwrite is deprecated and now has no effect. Consider removing the option, or using requirelockingbeforewrite.

      So just want to add which component and cache definition it is so you can go fix it.

            brendanheywood Brendan Heywood
            brendanheywood Brendan Heywood
            Sam Marshall Sam Marshall
            Andrew Lyons Andrew Lyons
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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