From 7a79b72a1b3620251783a1278a963ff0d206c836 Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Fri, 6 Nov 2020 16:14:56 +0800 Subject: [PATCH 1/1] DONOTCOMMIT: 70137 pre-patch testing --- cache/classes/config.php | 7 +++++++ cache/locallib.php | 13 +++++++++++++ 2 files changed, 20 insertions(+) diff --git a/cache/classes/config.php b/cache/classes/config.php index 53d0f1e178e..21c1128b18f 100644 --- a/cache/classes/config.php +++ b/cache/classes/config.php @@ -331,9 +331,16 @@ class cache_config { throw new cache_exception('Default cache config could not be found. It should have already been created by now.'); } + error_log(getmypid() . ": About to include {$cachefile}."); if (!include($cachefile)) { throw new cache_exception('Unable to load the cache configuration file'); } + error_log(getmypid() . ": Finished including {$cachefile}."); + if (is_array($configuration)) { + error_log(getmypid() . ": It has a size of " . count($configuration)); + } else { + error_log(getmypid() . ": It has a size of 0"); + } if (!is_array($configuration)) { throw new cache_exception('Invalid cache configuration file'); diff --git a/cache/locallib.php b/cache/locallib.php index b8509cedc27..31cec12c06c 100644 --- a/cache/locallib.php +++ b/cache/locallib.php @@ -86,6 +86,10 @@ class cache_config_writer extends cache_config { // Prepare the file content. $content = "configlocks); @@ -104,6 +108,14 @@ class cache_config_writer extends cache_config { if ($locking->lock('configwrite', 'config', true)) { // Its safe to use w mode here because we have already acquired the lock. $handle = fopen($cachefile, 'w'); + + error_log(getmypid() . ": Obtained file lock and handle. Pausing for a few seconds."); + error_log("========"); + error_log("LOAD THE OTHER BROWSER TAB NOW!!!"); + error_log("========"); + sleep(3); + error_log(getmypid() . ": Done sleeping - writing!"); + fwrite($handle, $content); fflush($handle); fclose($handle); @@ -114,6 +126,7 @@ class cache_config_writer extends cache_config { } else { throw new cache_exception('ex_configcannotsave', 'cache', '', null, 'Unable to open the cache config file.'); } + die; } /** -- 2.26.2