Add version check to the maintenance daemon

We should prevent running the deadlock detection if
there is a major version change. Otherwise, the daemon
may access to obsolete metadata catalog tables.
pull/1559/head
Onder Kalaci 2017-08-14 15:46:18 +03:00
parent 0d71fcd8af
commit 205501532a
1 changed files with 10 additions and 1 deletions

View File

@ -266,7 +266,16 @@ CitusMaintenanceDaemonMain(Datum main_arg)
if (DistributedDeadlockDetectionTimeoutFactor != -1.0)
{
StartTransactionCommand();
foundDeadlock = CheckForDistributedDeadlocks();
/*
* We don't want to run the deadlock checks if there exists
* any version mistmatch.
*/
if (CheckCitusVersion(DEBUG1))
{
foundDeadlock = CheckForDistributedDeadlocks();
}
CommitTransactionCommand();
/*