Apologies, abusing the subscriber list and set of tags from T239900 to get some input on a question.
$wgLBFactoryConf['hostsByName'] presently contains hosts from both datacenters, duplicated across both db-eqiad.php and db-codfw.php.
There's also a hostsByName hash in etcd, ready for use, but it contains only the local-datacenter DB servers. See for instance https://noc.wikimedia.org/dbconfig/eqiad.json
Is there ever any reason that a Mediawiki in eqiad would need to contact a DB server in codfw, or vice versa? As far as I can tell this should be impossible, since none of those hostnames are referenced elsewhere in $wgLBFactoryConf, which means that Mediawiki should have no idea which servers correspond to which sections, or have any reason to otherwise reference those extra entries appearing in hostsByName.
But I wanted to make sure before enabling the use of hostsByName from etcd in production, and removing some hundreds of lines of PHP that are suffixed with # do not remove or comment out