[00:15:01] message Count [00:15:02] {method} {exception} 135 [00:15:02] Lowered set() TTL for {cachekey} due to replication lag. 132 [00:15:06] That's unhelpful [01:01:22] is wfGetDB(1) the same as wfGetDB(DB_REPLICA)? [01:01:31] in practice, I mean [01:02:21] No? [01:02:22] const DB_REPLICA = -1; [01:02:51] dunno what it does with ohter numbers... [01:03:09] gets the DB with that connection index [01:03:25] no idea how those get assigned though [01:03:55] just found a fun bug where some code is passing an array, which PHP type juggles to 1 [06:41:57] TimStarling: re: https://bugs.php.net/bug.php?id=47540 was it fixed in 5.2? Can we safely remove the PHP_SAPI check in FileBackend::getScopedPHPBehaviorForOps() now? [06:43:16] hm, that code is also copied to LBFactory::getScopedPHPBehaviorForCommit()... [06:44:09] ...and LoadBalancer::getScopedPHPBehaviorForCommit() [06:49:28] AaronSchulz: T184044 [06:49:28] T184044: getScopedPHPBehaviorForCommit is copied 3 times in MediaWiki - https://phabricator.wikimedia.org/T184044 [15:08:11] tgr: IIRC it's either the order in which DB servers are defined in the config, or the order in which connections are opened [15:08:33] If it's the former it'll open a replica connection but always to the same replica [15:27:06] tgr|away: wfGetDB(1) is supposed to work as RoanKattouw says, which I think for LBFactoryMulti goes by the order in $wgLBFactoryConf['sectionLoads']. But there's a bug (introduced in https://gerrit.wikimedia.org/r/#/c/178747/) that makes anything that's not DB_MASTER be treated as DB_REPLICA unless you specifically specify invalid groups for the second parameter. https://gerrit.wikimedia.org/r/#/c/401520/ has a fix. [15:29:54] Ha nice catch [15:30:11] Only been broken for 3 years huh [15:34:48] Yea, I ran into that the other day when working on preventing writes to replicas... Anomie tracked down the origins of the issue.