From: Aaron Schulz Date: Fri, 30 Mar 2018 11:39:05 +0000 (-0700) Subject: rdbms: add more error logging to DatabaseMysqlBase::masterPosWait X-Git-Tag: 1.31.0-rc.0~240^2 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=7d8ea236ca7b0c30dd4665cd84adb88fe29c4938 rdbms: add more error logging to DatabaseMysqlBase::masterPosWait Change-Id: Ia687ddeffc9c9427c6126d8ed831fb52b38e8260 --- 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)