Commit 0f30350
committed
Avoid stale connections by pinging on acquire
The exporter was returning cached MongoDB connections without validating their health. This meant that if a connection had become unhealthy,
subsequent operations would fail after a delay (serverSelectionTimeout etc), causing the entire request to be slower than it should be.
This commit adds `Ping` check before returning a cached client.1 parent f6389c5 commit 0f30350
1 file changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
276 | | - | |
| 276 | + | |
277 | 277 | | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
278 | 283 | | |
279 | 284 | | |
280 | 285 | | |
| |||
0 commit comments