Page MenuHomePhabricator

Remove unused or barely used functions of ILoadBalancer and ILBFactory
Closed, ResolvedPublic

Description

Follows-up T296960: Remove unused or barely used functions of IDatabase
This is to do a first quick check of unused functions and remove any low-hanging fruits. More clean ups will come later.

ILoadBalancer:

  • waitForOne 2
  • finalizeMasterChanges 2
  • approveMasterChanges 2
  • runMasterTransactionIdleCallbacks 2
  • runMasterTransactionListenerCallbacks 2
  • flushMasterSnapshots 2
  • hasMasterConnection 2
  • lastMasterChangeTimestamp 2
  • pendingMasterChangeCallers 2
  • allowLagged 2
  • forEachOpenMasterConnection 2
  • forEachOpenReplicaConnection 2
  • waitForMasterPos 2
  • setTempTablesOnlyMode 3
  • getServerConnection 3
  • getMasterPos 3
  • flushPrimarySnapshots 3
  • hasPrimaryConnection 3
  • lastPrimaryChangeTimestamp 3
  • pendingPrimaryChangeCallers 3
  • getLaggedReplicaMode 3
  • pingAll 3
  • forEachOpenConnection 3
  • hasReplicaServers 4
  • getReplicaResumePos 4
  • finalizePrimaryChanges 4
  • approvePrimaryChanges 4
  • beginMasterChanges 4
  • commitMasterChanges 4
  • runPrimaryTransactionIdleCallbacks 4
  • runPrimaryTransactionListenerCallbacks 4
  • rollbackMasterChanges 4
  • hasMasterChanges 4
  • waitFor 5
  • getServerAttributes 5
  • hasPrimaryChanges 5
  • hasOrMadeRecentMasterChanges 5
  • laggedReplicaUsed 5
  • forEachOpenPrimaryConnection 5
  • waitForPrimaryPos 5
  • redefineLocalDomain 6
  • getReaderIndex 6
  • waitForAll 6
  • commitAll 6
  • setLocalDomainPrefix 6
  • getServerType 7
  • flushReplicaSnapshots 7
  • getAnyOpenConnection 8
  • setTransactionListener 8
  • setIndexAliases 8
  • hasStreamingReplicaServers 9

And ILBFactory:

  • Option "groupLoadsByDB". https://gerrit.wikimedia.org/r/c/mediawiki/core/+/752214
  • setAgentName 2
  • getChronologyProtectorClientId 2
  • isReadyForRoundOperations 3
  • setWaitForReplicationListener 3
  • appendShutdownCPIndexAsQuery 3
  • setDefaultReplicationWaitTimeout 3
  • beginMasterChanges 4
  • commitMasterChanges 4
  • rollbackMasterChanges 4
  • hasMasterChanges 4
  • getChronologyProtectorTouched 4
  • setRequestInfo 4
  • newExternalLB 5
  • hasTransactionRound 5
  • hasPrimaryChanges 5
  • laggedReplicaUsed 5
  • hasOrMadeRecentMasterChanges 5
  • disableChronologyProtection 5
  • redefineLocalDomain 6
  • getAllMainLBs 6
  • getAllExternalLBs 6
  • commitAll 6
  • setLocalDomainPrefix 6
  • flushReplicaSnapshots 7
  • setIndexAliases 8
  • forEachLB 9

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

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

[mediawiki/core@master] Remove two unused functions from LBFactory

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

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

[mediawiki/core@master] rdbms: Remove four hard-deprecated methods that are unused

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

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

[mediawiki/core@master] rdbms: Drop three unused functions from ILoadBalancer

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

Ladsgroup triaged this task as Medium priority.Jan 18 2022, 4:10 PM
Ladsgroup moved this task from Triage to In progress on the DBA board.

Change 754931 merged by jenkins-bot:

[mediawiki/core@master] rdbms: Remove four hard-deprecated methods that are unused

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

Change 754940 merged by jenkins-bot:

[mediawiki/core@master] rdbms: Drop three unused functions from ILoadBalancer

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

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

[mediawiki/core@master] rdbms: Remove deprecated methods from ILoadBalancer

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

Change 755760 merged by jenkins-bot:

[mediawiki/core@master] rdbms: Remove deprecated methods from ILoadBalancer

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

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

[mediawiki/core@master] rdbms: Drop maxLagByIndex property from LB

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

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

[mediawiki/core@master] rdbms: Remove LB::safeGetLag()

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

Change 756010 merged by jenkins-bot:

[mediawiki/core@master] rdbms: Drop maxLagByIndex property from LB

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

Change 756012 merged by jenkins-bot:

[mediawiki/core@master] rdbms: Remove LB::safeGetLag()

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

pingAll can be possibly cleaned up.

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

[mediawiki/core@master] rdbms: Drop ILoadBalancer::pingAll()

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

Change 757018 abandoned by Ladsgroup:

[mediawiki/core@master] rdbms: Drop ILoadBalancer::pingAll()

Reason:

Used

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

Ladsgroup moved this task from Incoming to Done on the User-Ladsgroup board.

We can do more clean ups later. The obvious cases have been removed.