Commit 4bc4a14
Expose whether a DB connection came from the connection pool
It would be useful for userland Hack code in Slack to determine
whether a connection obtained via an HHVM async_mysql connection pool
was recycled from the pool or freshly opened, to allow more granular
instrumentation than what pool-level stats currently provide.
See facebook#8013 for the full rationale.
The groundwork for this on the Squangle side has already been laid
in D92081429 née facebook/squangle#20.
Add methods to `AsyncMysqlConnection` that make use of the newly added
accessors to expose this information to Hack.
hphp/test/slow/ext_async_mysql/ doesn't seem to currently have tests
that interact with a MySQL server so I didn't include tests in this patch.
I can add some if needed.
Closes facebook#8013.
Co-authored-by: Henry Robinson <hrobinson@slack-corp.com>1 parent 80100e4 commit 4bc4a14
3 files changed
Lines changed: 30 additions & 0 deletions
File tree
- hphp
- hack/hhi/stdlib
- runtime/ext/async_mysql
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| 221 | + | |
| 222 | + | |
221 | 223 | | |
222 | 224 | | |
223 | 225 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1208 | 1208 | | |
1209 | 1209 | | |
1210 | 1210 | | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
1211 | 1223 | | |
1212 | 1224 | | |
1213 | 1225 | | |
| |||
2264 | 2276 | | |
2265 | 2277 | | |
2266 | 2278 | | |
| 2279 | + | |
| 2280 | + | |
2267 | 2281 | | |
2268 | 2282 | | |
2269 | 2283 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
664 | 664 | | |
665 | 665 | | |
666 | 666 | | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
667 | 681 | | |
668 | 682 | | |
669 | 683 | | |
| |||
0 commit comments