Hashar has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/337848 )
Change subject: Make ChronologyProtector::init() use instanceof instead of
empty()
......................................................................
Make ChronologyProtector::init() use instanceof instead of empty()
This is more robust and handles old root namespaced DBMasterPos values
Bug: T158127
Change-Id: Iba775fc808ac3e73d360f1adbe45ad222351c2d9
(cherry picked from commit eb9a0a73c9f13320f17a62e5d69b51a502926749)
---
M includes/libs/rdbms/ChronologyProtector.php
1 file changed, 4 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/48/337848/1
diff --git a/includes/libs/rdbms/ChronologyProtector.php
b/includes/libs/rdbms/ChronologyProtector.php
index 99e509c..1c28188 100644
--- a/includes/libs/rdbms/ChronologyProtector.php
+++ b/includes/libs/rdbms/ChronologyProtector.php
@@ -119,7 +119,10 @@
$this->initPositions();
$masterName = $lb->getServerName( $lb->getWriterIndex() );
- if ( !empty( $this->startupPositions[$masterName] ) ) {
+ if (
+ isset( $this->startupPositions[$masterName] ) &&
+ $this->startupPositions[$masterName] instanceof
DBMasterPos
+ ) {
$pos = $this->startupPositions[$masterName];
$this->logger->info( __METHOD__ . ": LB for
'$masterName' set to pos $pos\n" );
$lb->waitFor( $pos );
--
To view, visit https://gerrit.wikimedia.org/r/337848
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iba775fc808ac3e73d360f1adbe45ad222351c2d9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.29.0-wmf.12
Gerrit-Owner: Hashar <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits