diff options
author | daniel <dkinzler@wikimedia.org> | 2022-05-24 15:50:02 +0200 |
---|---|---|
committer | Amir Sarabadani <ladsgroup@gmail.com> | 2022-08-05 17:32:12 +0200 |
commit | 5b0b54599bfddd72e9884ef37e932eb26bc8dc5b (patch) | |
tree | 8c814f3645f077c069db30490c21eb4c8a08bf56 /includes/Emptiable.php | |
parent | 6bfbc4b6cc4cf22598ad506f6d5d9e5dec45b5cb (diff) | |
download | mediawikicore-5b0b54599bfddd72e9884ef37e932eb26bc8dc5b.tar.gz mediawikicore-5b0b54599bfddd72e9884ef37e932eb26bc8dc5b.zip |
Allow DB config to be reloaded on the fly
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
Diffstat (limited to 'includes/Emptiable.php')
0 files changed, 0 insertions, 0 deletions