From 7d8ea236ca7b0c30dd4665cd84adb88fe29c4938 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Fri, 30 Mar 2018 04:39:05 -0700 Subject: [PATCH] rdbms: add more error logging to DatabaseMysqlBase::masterPosWait Change-Id: Ia687ddeffc9c9427c6126d8ed831fb52b38e8260 --- includes/libs/rdbms/database/DatabaseMysqlBase.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/includes/libs/rdbms/database/DatabaseMysqlBase.php b/includes/libs/rdbms/database/DatabaseMysqlBase.php index 286d65881e..5e06f28d64 100644 --- a/includes/libs/rdbms/database/DatabaseMysqlBase.php +++ b/includes/libs/rdbms/database/DatabaseMysqlBase.php @@ -901,6 +901,13 @@ abstract class DatabaseMysqlBase extends Database { $rpos = $this->getReplicaPos(); $gtidsWait = $rpos ? MySQLMasterPos::getCommonDomainGTIDs( $pos, $rpos ) : []; if ( !$gtidsWait ) { + $this->queryLogger->error( + "No GTIDs with the same domain between master ($pos) and replica ($rpos)", + $this->getLogContext( [ + 'method' => __METHOD__, + ] ) + ); + return -1; // $pos is from the wrong cluster? } // Wait on the GTID set (MariaDB only) -- 2.20.1