diff --git a/includes/libs/rdbms/database/Database.php b/includes/libs/rdbms/database/Database.php index 6e611d57c61..a132fb6f76f 100644 --- a/includes/libs/rdbms/database/Database.php +++ b/includes/libs/rdbms/database/Database.php @@ -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 ); } diff --git a/includes/libs/rdbms/database/replication/ReplicationReporter.php b/includes/libs/rdbms/database/replication/ReplicationReporter.php index 8d141e37bd6..43e8f484b88 100644 --- a/includes/libs/rdbms/database/replication/ReplicationReporter.php +++ b/includes/libs/rdbms/database/replication/ReplicationReporter.php @@ -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 { diff --git a/tests/phpunit/includes/utils/BatchRowUpdateTest.php b/tests/phpunit/includes/utils/BatchRowUpdateTest.php index 01af517521e..f94fe3ec4e4 100644 --- a/tests/phpunit/includes/utils/BatchRowUpdateTest.php +++ b/tests/phpunit/includes/utils/BatchRowUpdateTest.php @@ -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; } }