-
Notifications
You must be signed in to change notification settings - Fork 106
Improve handling for autoReconnect: false with timeouts #215
Conversation
@mbroadst any thoughts on this? |
@vkarpov15 generally LGTM, my only hesitation is that there are no accompanying tests. Have you tried reproducing this with the mock server at all? It should be relatively easy to exercise this code path that way. |
I haven't worked with the mongodb-core tests in a while so I was hesitant to dig into that. I'll have some time to circle back and look later this week. |
@vkarpov15 the testing story on the 3.0.0 branches is much improved, perhaps we could compromise on merging into both branches but only tests there 😄 Either way, I promise I'll take a look at this as I have time after 3.6 features are complete if you don't find the time. |
@mbroadst got your tests ☝️ very tricky to get right but finally got it working, please review 👍 |
@vkarpov15 rad! Thanks for going through the trouble, I really appreciate that. |
Cool. When can we get this merged so I can close out Automattic/mongoose#4513? |
Any ETA on release? Don't mean to nag, just eager to close out the issue. Also, re: discussion a few weeks back, here's a writeup on some learnings about connection events in the node driver |
@vkarpov15 by end of week. I want to make sure to back out anything from #220 before the release, it seems that a memory leak was introduced there for sure. Thanks for that blog post, I'll make sure to read through it! |
@vkarpov15 v2.1.16 and v2.2.32 are released 😄 |
@adriaanmeuris and @bendytree 's repro for Automattic/mongoose#4513 helped uncover a few couple nasty edge cases with how mongodb-core handles
autoReconnect: false
.First up, with the server topology, the below script will hang forever, because the
count()
call will wait forever for a reconnect.There's a similar issue with cursor, it'll just wait forever for a reconnect that the driver will never attempt.