Page MenuHomePhabricator

Remove old/unused/internal methods in rdbms library from the public APIs
Closed, ResolvedPublic

Description

The last leg of FY2023-24 WE3.2.1 hypo work.

https://meta.wikimedia.org/wiki/Wikimedia_Foundation_Annual_Plan/2023-2024/Product_%26_Technology/OKRs#WE3:_Knowledge_Platform

These changes mean in some cases we should soft-deprecate the method, sometimes hard-deprecate, sometimes complete removal, sometimes removing from the interface while keeping it in the class (to hide it to the outside of rdbms lib), and some cases, only mark them @internal in documentation.
Candidates for such changes are:

  • ISQLPlatform::limitResult()
  • ISQLPlatform::buildLike()
  • ISQLPlatform::unionQueries()
  • IReadableDatabase::lastErrno()
  • IReadableDatabase::selectField()
  • IReadableDatabase::selectFieldValues()
  • IReadableDatabase::selectRow()
  • IReadableDatabase::estimateRowCount()
  • IReadableDatabase::selectRowCount()
  • IReadableDatabase::databasesAreIndependent()
  • IReadableDatabase::selectDomain()
  • IReadableDatabase::wasDeadlock()
  • IReadableDatabase::wasReadOnlyError()
  • IReadableDatabase::primaryPosWait()
  • IReadableDatabase::getReplicaPos()
  • IReadableDatabase::getSessionLagStatus()
  • IDatabase::getTopologyBasedServerId()
  • IDatabase::getTopologyRole()
  • IDatabase::lastDoneWrites()
  • IDatabase::setLBInfo()
  • IDatabase::writesPending()
  • IDatabase::writesOrCallbacksPending()
  • IDatabase::pendingWriteQueryDuration()
  • IDatabase::pendingWriteCallers()
  • IDatabase::lockForUpdate()
  • IDatabase::nextSequenceValue()
  • IDatabase::getPrimaryPos()
  • IDatabase::serverIsReadOnly()
  • IDatabase::setTransactionListener()
  • IDatabase::flushSession()
  • IDatabase::lockIsFree()
  • IDatabase::namedLocksEnqueue()
  • ILoadBalancer::reuseConnection()
  • ILoadBalancer::getConnectionRef()
  • ILoadBalancer::getServerConnection()
  • ILoadBalancer::getConnectionInternal()
  • ILoadBalancer::getWriterIndex()
  • ILoadBalancer::laggedReplicaUsed()
  • ILoadBalancer::getReadOnlyReason()
  • ILBFactory::newMainLB()
  • ILBFactory::newExternalLB()
  • ILBFactory::getAllMainLBs()
  • ILBFactory::getAllExternalLBs()
  • ILBFactory::hasPrimaryChanges()
  • ILBFactory::laggedReplicaUsed()
  • ILBFactory::disableChronologyProtection()
  • ILBFactory::setAgentName()
  • ILBFactory::setIndexAliases()

Details

SubjectRepoBranchLines +/-
mediawiki/coremaster+8 -340
mediawiki/coremaster+22 -22
mediawiki/coremaster+38 -37
mediawiki/extensions/WikiSEOmaster+0 -0
mediawiki/coremaster+1 -18
operations/mediawiki-configmaster+2 -2
mediawiki/coremaster+22 -21
mediawiki/coremaster+3 -33
mediawiki/coremaster+61 -48
mediawiki/coremaster+254 -249
mediawiki/coremaster+32 -43
mediawiki/coremaster+1 -38
mediawiki/coremaster+13 -55
mediawiki/coremaster+1 -24
mediawiki/coremaster+114 -81
mediawiki/coremaster+4 -41
mediawiki/coremaster+2 -20
mediawiki/coremaster+10 -8
mediawiki/coremaster+5 -25
Show related patches Customize query in gerrit

Event Timeline

Ladsgroup triaged this task as Medium priority.Apr 30 2024, 3:24 PM
Ladsgroup moved this task from Triage to In progress on the DBA board.

Change #1025809 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):

[mediawiki/core@master] rdbms: Remove IReadableDatabase::getReplicaPos()

https://gerrit.wikimedia.org/r/1025809

Change #1025813 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):

[mediawiki/core@master] rdbms: Move ILoadBalancer::laggedReplicaUsed() to ILoadBalancerForOwner

https://gerrit.wikimedia.org/r/1025813

Change #1025809 merged by jenkins-bot:

[mediawiki/core@master] rdbms: Remove IReadableDatabase::getReplicaPos()

https://gerrit.wikimedia.org/r/1025809

Change #1025813 merged by jenkins-bot:

[mediawiki/core@master] rdbms: Move ILoadBalancer::laggedReplicaUsed() to ILoadBalancerForOwner

https://gerrit.wikimedia.org/r/1025813

Change #1029227 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):

[mediawiki/core@master] rdbms: Remove IDatabase::namedLocksEnqueue()

https://gerrit.wikimedia.org/r/1029227

Change #1029228 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):

[mediawiki/core@master] rdbms: Remove IDatabase::getTopologyBasedServerId()

https://gerrit.wikimedia.org/r/1029228

Change #1029227 merged by jenkins-bot:

[mediawiki/core@master] rdbms: Remove IDatabase::namedLocksEnqueue()

https://gerrit.wikimedia.org/r/1029227

Change #1029228 merged by jenkins-bot:

[mediawiki/core@master] rdbms: Remove IDatabase::getTopologyBasedServerId()

https://gerrit.wikimedia.org/r/1029228

Change #1031845 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):

[mediawiki/core@master] rdbms: Introduce IDatabaseForOwner

https://gerrit.wikimedia.org/r/1031845

Change #1031869 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):

[mediawiki/core@master] rdbms: Drop IDatabase::getTopologyRole()

https://gerrit.wikimedia.org/r/1031869

Change #1035537 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):

[mediawiki/core@master] [POC][WIP] rdbms: Introduce IWriteQueryHandler

https://gerrit.wikimedia.org/r/1035537

Change #1019104 had a related patch set uploaded (by Ladsgroup; author: Aaron Schulz):

[mediawiki/core@master] rdbms: remove IMaintainableDatabase::truncate() method

https://gerrit.wikimedia.org/r/1019104

Change #1031845 merged by jenkins-bot:

[mediawiki/core@master] rdbms: Introduce IDatabaseForOwner

https://gerrit.wikimedia.org/r/1031845

Change #1031869 merged by jenkins-bot:

[mediawiki/core@master] rdbms: Drop IDatabase::getTopologyRole()

https://gerrit.wikimedia.org/r/1031869

Change #1019104 merged by jenkins-bot:

[mediawiki/core@master] rdbms: remove IMaintainableDatabase::truncate() method

https://gerrit.wikimedia.org/r/1019104

Change #1037057 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):

[mediawiki/core@master] rdbms: Move several more methods to IDatabaseForOwner

https://gerrit.wikimedia.org/r/1037057

Change #1037058 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):

[mediawiki/core@master] rdbms: Remove ILoadBalancer::getWriterIndex()

https://gerrit.wikimedia.org/r/1037058

Change #1037059 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):

[mediawiki/extensions/WikiSEO@master] Avoid using ILoadBalancer::getWriterIndex()

https://gerrit.wikimedia.org/r/1037059

Change #1037798 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):

[mediawiki/core@master] rdbms: Drop IReadableDatabase::wasDeadlock()

https://gerrit.wikimedia.org/r/1037798

Change #1037798 merged by jenkins-bot:

[mediawiki/core@master] rdbms: Drop IReadableDatabase::wasDeadlock()

https://gerrit.wikimedia.org/r/1037798

Change #1035537 abandoned by Ladsgroup:

[mediawiki/core@master] [POC][WIP] rdbms: Introduce IWriteQueryHandler

Reason:

Because of MLEB extensions, we need to wait a while

https://gerrit.wikimedia.org/r/1035537

Change #1037058 merged by jenkins-bot:

[mediawiki/core@master] rdbms: Remove ILoadBalancer::getWriterIndex()

https://gerrit.wikimedia.org/r/1037058

Change #1038785 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):

[operations/mediawiki-config@master] rpc: Update function call in RunSingleJob

https://gerrit.wikimedia.org/r/1038785

Change #1038809 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):

[mediawiki/core@master] rdbms: Drop IReadableDatabase::wasReadOnlyError()

https://gerrit.wikimedia.org/r/1038809

Change #1038809 merged by jenkins-bot:

[mediawiki/core@master] rdbms: Drop IReadableDatabase::wasReadOnlyError()

https://gerrit.wikimedia.org/r/1038809

Change #1037057 merged by jenkins-bot:

[mediawiki/core@master] rdbms: Move several more methods to IDatabaseForOwner

https://gerrit.wikimedia.org/r/1037057

Change #1040147 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):

[mediawiki/core@master] rdbms: Move IReadableDatabase::primaryPosWait() to IDatabaseForOwner

https://gerrit.wikimedia.org/r/1040147

Change #1040147 merged by jenkins-bot:

[mediawiki/core@master] rdbms: Move IReadableDatabase::primaryPosWait() to IDatabaseForOwner

https://gerrit.wikimedia.org/r/1040147

Change #1038785 merged by jenkins-bot:

[operations/mediawiki-config@master] rpc: Update function call in RunSingleJob

https://gerrit.wikimedia.org/r/1038785

Mentioned in SAL (#wikimedia-operations) [2024-07-03T11:47:02Z] <ladsgroup@deploy1002> Started scap sync-world: Backport for [[gerrit:1038785|rpc: Update function call in RunSingleJob (T363839)]]

Mentioned in SAL (#wikimedia-operations) [2024-07-03T11:49:56Z] <ladsgroup@deploy1002> ladsgroup: Backport for [[gerrit:1038785|rpc: Update function call in RunSingleJob (T363839)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-07-03T11:55:10Z] <ladsgroup@deploy1002> Finished scap: Backport for [[gerrit:1038785|rpc: Update function call in RunSingleJob (T363839)]] (duration: 08m 08s)

Change #1052346 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):

[mediawiki/core@master] [WIP] rdbms: Remove handling of cancel callbacks

https://gerrit.wikimedia.org/r/1052346

Change #1065261 had a related patch set uploaded (by Aaron Schulz; author: Aaron Schulz):

[mediawiki/core@master] rdbms: remove unused ILoadBalancer::reuseConnection() method

https://gerrit.wikimedia.org/r/1065261

Change #1065261 merged by jenkins-bot:

[mediawiki/core@master] rdbms: remove unused ILoadBalancer::reuseConnection() method

https://gerrit.wikimedia.org/r/1065261

Change #1075595 had a related patch set uploaded (by Aaron Schulz; author: Aaron Schulz):

[mediawiki/core@master] rdbms: move getServerConnection to ILoadBalancerForOwner

https://gerrit.wikimedia.org/r/1075595

Change #1037059 abandoned by Umherirrender:

[mediawiki/extensions/WikiSEO@master] Avoid using ILoadBalancer::getWriterIndex()

Reason:

Done as part of I4c40d687a754d535f956e156e3bf42857ddf8ac6

https://gerrit.wikimedia.org/r/1037059

Change #1077107 had a related patch set uploaded (by Aaron Schulz; author: Aaron Schulz):

[mediawiki/core@master] [DNM] rdbms: move internal newMainLB()/newExternalLB() methods out of ILBFactory

https://gerrit.wikimedia.org/r/1077107

Change #1052346 merged by jenkins-bot:

[mediawiki/core@master] rdbms: Remove handling of cancel callbacks

https://gerrit.wikimedia.org/r/1052346

Avoiding lingering. I'm done with the removals. Further deprecations/removals can be done in new tasks.