Page MenuHomePhabricator

Consider making ILoadBalancer::getServerConnection private or internal
Closed, ResolvedPublic

Description

Follow-up from T236880: Document when to use different ILoadBalancer::get*Connection* methods

It seems there is not currently use of this method outside Rdbms internals. Seems like an easy one to remove from the public API, in favour of getConnection.

In general external callers should not be concerned about the host/ports of individual database servers. If they aware of such servers, they either need to ignore that knowledge, or create their own LBFactory. There is presumably no known use case for how an external caller could know about a specific dbhost, know it is present in LBFactory, and not be in change of having that same LBFactory instance.

Details

Event Timeline

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

To accompany other ILoadBalancer work.

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

[mediawiki/core@master] rdbms: mark getServerConnection() as @internal

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

Change 731794 merged by jenkins-bot:

[mediawiki/core@master] rdbms: mark getServerConnection() as @internal

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

aaron claimed this task.