Currently, in Wikimedia\Rdbms\ConnectionManager (a MediaWiki core class, though mainly used in Wikibase I believe), getWriteConnection() and getReadConnection() are deprecated (since 1.38) in favor of getWriteConnectionRef() and getReadConnectionRef(); at the time, the underlying ILoadBalancer::getConnection() required a matching call to reuseConnection(), while ILoadBalancer::getConnectionRef() automatically released itself based on ref counting. In T255493, the difference between these two methods was eliminated – getConnection() is now an alias for getConnectionRef() (i.e. all connections are reference-counted), but callers are encouraged to use the shorter getConnection() name, and getConnectionRef() is @deprecated since 1.39. The ConnectionManager methods should be updated to match this: getWriteConnection() and getReadConnection() should be undeprecated, and getWriteConnectionRef() and getReadConnectionRef() be deprecated instead (along with releaseConnection()).
Description
Description
Details
Details
Project | Branch | Lines +/- | Subject | |
---|---|---|---|---|
mediawiki/core | master | +6 -6 | rdbms: Flip ConnectionManager deprecations to match ILoadBalancer |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T302623 FY2022-2023: Improve Backend Pageview Timing | |||
Open | Ladsgroup | T302880 Reduce connections opened by mediawiki | |||
Resolved | Ladsgroup | T255493 Consider phasing out ILoadBalancer::getLazyConnectionRef in favour of ILoadBalancer::getConnectionRef | |||
Resolved | Krinkle | T312527 Flip deprecations of ConnectionManager::get*Connection(Ref) |
Event Timeline
Comment Actions
Change 811938 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):
[mediawiki/core@master] Flip ConnectionManager deprecations to match ILoadBalancer
Comment Actions
Change 811938 merged by jenkins-bot:
[mediawiki/core@master] rdbms: Flip ConnectionManager deprecations to match ILoadBalancer