rdbms: Drop Database::getApproximateLagStatus()
It's unused, TrxManager can simply turn it into a protected method and it's not part of IDatabase interface nor stable. Change-Id: I8803ab4c14c6fb6222f7dea8fd0d0795583dcde9
This commit is contained in:
parent
3ee932ef5f
commit
ee393211f0
3 changed files with 2 additions and 8 deletions
|
|
@ -3834,10 +3834,6 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware
|
|||
return $this->replicationReporter->getTopologyBasedServerId( $this );
|
||||
}
|
||||
|
||||
protected function getApproximateLagStatus() {
|
||||
return $this->replicationReporter->getApproximateLagStatus( $this );
|
||||
}
|
||||
|
||||
public function getLag() {
|
||||
return $this->replicationReporter->getLag( $this );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ class ReplicationReporter {
|
|||
* @return array ('lag': seconds or false on error, 'since': UNIX timestamp of estimate)
|
||||
* @since 1.27 in Database, moved to ReplicationReporter in 1.40
|
||||
*/
|
||||
public function getApproximateLagStatus( IDatabase $conn ) {
|
||||
protected function getApproximateLagStatus( IDatabase $conn ) {
|
||||
if ( $this->topologyRole === IDatabase::ROLE_STREAMING_REPLICA ) {
|
||||
// Avoid exceptions as this is used internally in critical sections
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -239,7 +239,7 @@ class BatchRowUpdateTest extends MediaWikiIntegrationTestCase {
|
|||
// FIXME: the constructor normally sets mAtomicLevels and mSrvCache, and platform
|
||||
$databaseMysql = $this->getMockBuilder( Wikimedia\Rdbms\DatabaseMysqli::class )
|
||||
->disableOriginalConstructor()
|
||||
->onlyMethods( array_merge( [ 'isOpen', 'getApproximateLagStatus' ], $methods ) )
|
||||
->onlyMethods( array_merge( [ 'isOpen' ], $methods ) )
|
||||
->getMock();
|
||||
|
||||
$reflection = new ReflectionClass( $databaseMysql );
|
||||
|
|
@ -249,8 +249,6 @@ class BatchRowUpdateTest extends MediaWikiIntegrationTestCase {
|
|||
|
||||
$databaseMysql->method( 'isOpen' )
|
||||
->willReturn( true );
|
||||
$databaseMysql->method( 'getApproximateLagStatus' )
|
||||
->willReturn( [ 'lag' => 0, 'since' => 0 ] );
|
||||
return $databaseMysql;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue