mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-30 18:45:07 +00:00
s/slave/replica/
Bug: T254646 Change-Id: I4de3985fd8568ce07919623efe2981bc0b6c54e5
This commit is contained in:
parent
9564e1ae50
commit
aa702c1471
|
@ -133,9 +133,9 @@ class MWEchoDbFactory {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wait for the slaves of the database
|
* Wait for the replicas of the database
|
||||||
*/
|
*/
|
||||||
public function waitForSlaves() {
|
public function waitForReplicas() {
|
||||||
$this->waitFor( $this->getMasterPosition() );
|
$this->waitFor( $this->getMasterPosition() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -167,7 +167,7 @@ class MWEchoDbFactory {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Receives the output of self::getMasterPosition. Waits
|
* Receives the output of self::getMasterPosition. Waits
|
||||||
* for slaves to catch up to the master position at that
|
* for replicas to catch up to the master position at that
|
||||||
* point.
|
* point.
|
||||||
*
|
*
|
||||||
* @param array $position
|
* @param array $position
|
||||||
|
|
|
@ -68,7 +68,7 @@ class BackfillUnreadWikis extends Maintenance {
|
||||||
|
|
||||||
$processed += count( $batch );
|
$processed += count( $batch );
|
||||||
$this->output( "Updated $processed users.\n" );
|
$this->output( "Updated $processed users.\n" );
|
||||||
$dbFactory->waitForSlaves();
|
$dbFactory->waitForReplicas();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,7 @@ class ProcessEchoEmailBatch extends Maintenance {
|
||||||
}
|
}
|
||||||
$count++;
|
$count++;
|
||||||
}
|
}
|
||||||
$lbFactory->waitForSlaves();
|
$lbFactory->waitForReplicas();
|
||||||
|
|
||||||
// double check to make sure that the id is updated
|
// double check to make sure that the id is updated
|
||||||
if ( !$updated ) {
|
if ( !$updated ) {
|
||||||
|
|
|
@ -78,7 +78,7 @@ class RecomputeNotifCounts extends Maintenance {
|
||||||
}
|
}
|
||||||
$count += count( $batch );
|
$count += count( $batch );
|
||||||
$this->output( "$count users' counts recomputed.\n" );
|
$this->output( "$count users' counts recomputed.\n" );
|
||||||
$dbFactory->waitForSlaves();
|
$dbFactory->waitForReplicas();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,7 +76,7 @@ class RemoveInvalidNotification extends Maintenance {
|
||||||
$this->commitTransaction( $dbw, __METHOD__ );
|
$this->commitTransaction( $dbw, __METHOD__ );
|
||||||
|
|
||||||
$this->output( "processing " . count( $event ) . " invalid events\n" );
|
$this->output( "processing " . count( $event ) . " invalid events\n" );
|
||||||
$lbFactory->waitForSlaves();
|
$lbFactory->waitForReplicas();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cleanup is not necessary for
|
// Cleanup is not necessary for
|
||||||
|
|
|
@ -63,7 +63,7 @@ class RemoveOrphanedEvents extends LoggedUpdateMaintenance {
|
||||||
$dbw->delete( 'echo_target_page', [ 'etp_event' => $ids ], __METHOD__ );
|
$dbw->delete( 'echo_target_page', [ 'etp_event' => $ids ], __METHOD__ );
|
||||||
$targetsProcessed += $dbw->affectedRows();
|
$targetsProcessed += $dbw->affectedRows();
|
||||||
$this->output( "Deleted $eventsProcessed orphaned events and $targetsProcessed target_page rows.\n" );
|
$this->output( "Deleted $eventsProcessed orphaned events and $targetsProcessed target_page rows.\n" );
|
||||||
$dbFactory->waitForSlaves();
|
$dbFactory->waitForReplicas();
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->output( "Removing any remaining orphaned echo_target_page rows...\n" );
|
$this->output( "Removing any remaining orphaned echo_target_page rows...\n" );
|
||||||
|
@ -86,7 +86,7 @@ class RemoveOrphanedEvents extends LoggedUpdateMaintenance {
|
||||||
$dbw->delete( 'echo_target_page', [ 'etp_event' => $ids ], __METHOD__ );
|
$dbw->delete( 'echo_target_page', [ 'etp_event' => $ids ], __METHOD__ );
|
||||||
$processed += $dbw->affectedRows();
|
$processed += $dbw->affectedRows();
|
||||||
$this->output( "Deleted $processed orphaned target_page rows.\n" );
|
$this->output( "Deleted $processed orphaned target_page rows.\n" );
|
||||||
$dbFactory->waitForSlaves();
|
$dbFactory->waitForReplicas();
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue