This introduces $wgLBFactoryConf['configCallback'] which can be set to a function that returns updates to be applied to $wgLBFactoryConf. The new method LBFactory::autoreConfigure() can be called to check the callabck and, if the config changed, reconfigure all existing LoadBalancers. Reconfiguring the LoadBalancers causes all open connections to be invalidated; however, any DBConnRef instances will remain valid and will acquire a fresh connection from the LoadBalancer automatically when appropriate. As a proof of concept, this patch adds support for config reloding into WikiExporter. Bug: T298485 Change-Id: I6c3ffde62f6e038730736abe980befd90ec43e1a |
||
|---|---|---|
| .. | ||
| DatabaseTestHelper.php | ||
| LBFactoryTest.php | ||
| LoadBalancerTest.php | ||