This is to track this quarter's OKR on removign at least 10% complexity score of these two classes. They are overly large without apparent benefit.
Internal clean ups: Remove unused code, Remove functions that bring no actual value, simplify the logic in data attributes. DRY the code, etc.
Work:
- New DB connect/query methods for MediaWiki: getReplicaDatabase() and getPrimaryDatabase(). – https://lists.wikimedia.org/hyperkitty/list/wikitech-l@lists.wikimedia.org/message/YNLVJVTYTK3IGQF4HY7ITGMIJ2W5Q7CG/
- New New stable IConnectionProvider interface. https://lists.wikimedia.org/hyperkitty/list/wikitech-l@lists.wikimedia.org/message/GATRFC63FPQJ6Z43WZDIKSHYZQJCI62H/
- Revaluate LBFactory->commitAll, per https://gerrit.wikimedia.org/r/c/mediawiki/core/+/878240/1#message-756dd1679aef2c18a0c86b05ba1ea44842296372.
- Clean up commitPrimaryChanges and similar have $options parameter that's only used to set 'maxWriteDuration' and simply can be changed to have $maxWriteDuration instead.
- Remove configurations like waitTimeout or maxLag and from the public API, inline them internally where needed.