From 4a26aebe752764d7a84859a5124c1e88e05d6432 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 post-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 021e2a69dd9..fee874e2e16 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 db20b05fb2f..e5401b2c477 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); @@ -105,6 +109,14 @@ class cache_config_writer extends cache_config { $tempcachefile = "{$cachefile}.tmp"; // Its safe to use w mode here because we have already acquired the lock. $handle = fopen($tempcachefile, '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); @@ -116,6 +128,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