From 98b8f48a843b0d75c3ce5281deacb9fbc4a1c33e Mon Sep 17 00:00:00 2001 From: Gunnstein Lye Date: Fri, 12 Jul 2019 16:26:47 +0200 Subject: [PATCH] DFS: Cache gen. timeout check only when needed (#1436) Only check cache generation timeout when generation has actually started. Avoids SQL error. --- .../classes/clusterfilehandlers/ezdfsfilehandler.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kernel/private/classes/clusterfilehandlers/ezdfsfilehandler.php b/kernel/private/classes/clusterfilehandlers/ezdfsfilehandler.php index f5a19ada8ae..0811fd7951e 100644 --- a/kernel/private/classes/clusterfilehandlers/ezdfsfilehandler.php +++ b/kernel/private/classes/clusterfilehandlers/ezdfsfilehandler.php @@ -1371,6 +1371,12 @@ public function abortCacheGeneration() */ public function checkCacheGenerationTimeout() { + if ( $this->generationStartTimestamp === false ) + { + eZDebug::writeError( "Cache generation has not started, cannot check timeout", 'cluster.log' ); + return true; + } + eZDebugSetting::writeDebug( 'kernel-clustering', 'Checking cache generation timeout', "dfs::checkCacheGenerationTimeout( '{$this->filePath}' )" ); return self::$dbbackend->_checkCacheGenerationTimeout( $this->filePath, $this->generationStartTimestamp ); }