[15:39:09] Amir1: I'm llooking at reuseConnnection() patches and noticing DBConnRef docs are pretty outdated. [15:39:22] I'm actually slightly unsure how it is supposed to work today. So there isn't a destruct() on this object anymore. [15:39:35] We instead defer when we call getConnctionInternal on LB until the last possible moment [15:39:54] presumably this is agnostic to transactions and stuff just ends up the same tarnsaction regardless. [15:39:57] yeah, I'm not sure if we really ever close the connection [15:40:09] not close per-se but mark as available for re-use [15:40:11] except rdbms internals [15:40:28] everything just is re-usable regardless of what you do when it's coming from public LB->getConnection right? [15:40:36] there is an inline comment there about selected domains [15:40:38] yeah, that's the idea [15:40:50] suggesting that if you specify a domain we will not re-use and switch domain, but give you a new connection [15:43:40] which to my knowledge is not correct right? [15:46:35] right, afaik we forcefully switch each time [15:46:42] even on a per-query basis [15:47:03] I can see how that might be suboptimal in some cases, but very unlikely in practice. [15:48:18] but yeah, it does seem true that we grab whichever conn from the pool for the same section, and then selectDB as-needed. [15:48:28] which given everything uses DBConnRef is functionally safe [15:48:36] you won't poison another connection e.g. [15:48:53] but might in theory be inefficicnet if you have interleaving two db handles being queried that are internally the same. [15:49:10] although not better/worse per se than having separate transactions. [15:49:19] and more RTT for connection [15:49:31] seem slike a nice simplification and already gone through CR long ago [15:49:33] but docs don't match [15:56:09] Updating docs: https://gerrit.wikimedia.org/r/1020859 [16:02:36] thanks