| hoo added a comment. |
MY preferred solution would be to introduce a "ConnectionManager" or "ConnectionHandle" interface into core. WikibaseClient has ConsistentReadConnectionManager that would be one possible implementation. Setting the desired db groupcould easily be added to that.
This is very similar to my second idea… having it in core (in a widely used manner, with broad consensus) would probably make it a nice solution.
I'm not sure the gains outweigh the amount of work needed here, but then again, injecting DB connections, rather than using global functions sounds like a good idea to me in general.
One thing that is unclear: What are the benefits of introducing a new class rather than to extend LoadBalancer (which is what we use to "lazy" inject database connections these days).
Cc: thiemowmde, Addshore, aaron, Aklapper, Smalyshev, Lydia_Pintscher, jcrespo, aude, daniel, hoo, D3r1ck01, Izno, Wikidata-bugs, Mbch331
_______________________________________________ Wikidata-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
