jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/394241 )

Change subject: Add wfWaitForSlaves() to maintenance/migrateComments.php
......................................................................


Add wfWaitForSlaves() to maintenance/migrateComments.php

Change-Id: Idb8d21116a52c473cc4658883fe13855bad92222
(cherry picked from commit f6f5fadd397c2eb679fb7ee6e20f7a9cf961834b)
---
M maintenance/migrateComments.php
1 file changed, 4 insertions(+), 0 deletions(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/maintenance/migrateComments.php b/maintenance/migrateComments.php
index 9d4e261..4af6a2a 100644
--- a/maintenance/migrateComments.php
+++ b/maintenance/migrateComments.php
@@ -144,6 +144,7 @@
                $primaryKey = (array)$primaryKey;
                $pkFilter = array_flip( $primaryKey );
                $this->output( "Beginning migration of $table.$oldField to 
$table.$newField\n" );
+               wfWaitForSlaves();
 
                $dbw = $this->getDB( DB_MASTER );
                $next = '1=1';
@@ -206,6 +207,7 @@
                        }
                        $prompt = join( ' ', array_reverse( $prompt ) );
                        $this->output( "... $prompt\n" );
+                       wfWaitForSlaves();
                }
 
                $this->output(
@@ -231,6 +233,7 @@
        protected function migrateToTemp( $table, $primaryKey, $oldField, 
$newPrimaryKey, $newField ) {
                $newTable = $table . '_comment_temp';
                $this->output( "Beginning migration of $table.$oldField to 
$newTable.$newField\n" );
+               wfWaitForSlaves();
 
                $dbw = $this->getDB( DB_MASTER );
                $next = [];
@@ -279,6 +282,7 @@
                        // Calculate the "next" condition
                        $next = [ $primaryKey . ' > ' . $dbw->addQuotes( 
$row->$primaryKey ) ];
                        $this->output( "... {$row->$primaryKey}\n" );
+                       wfWaitForSlaves();
                }
 
                $this->output(

-- 
To view, visit https://gerrit.wikimedia.org/r/394241
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Idb8d21116a52c473cc4658883fe13855bad92222
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_30
Gerrit-Owner: Legoktm <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Parent5446 <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to