[GODRIVER-715] driver.KillCursors does not close connection Created: 17/Dec/18  Updated: 28/Oct/23  Resolved: 19/Dec/18

Status: Closed
Project: Go Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 0.2.0

Type: Bug Priority: Critical - P2
Reporter: Eric Daniels (Inactive) Assignee: Kristofer Brandow (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

driver.KillCursors being called by changestream's Next does not close the connection it takes a lease on which can cause non deterministic hands in Disconnect.

Used the following to detect this in a test: https://gist.github.com/edaniels/3968df00d4ed5cb614756f89d8efb09a

Old:
I'm hitting a pretty odd issue trying to run tests in Stitch on latest driver code. During test teardown every once in a while we hang indefinitely trying to disconnect acquiring a semaphore.

See these stack dumps:
https://evergreen.mongodb.com/test_log/5c17c1512fbabee87f89f729#L5729
https://evergreen.mongodb.com/test_log/5c17d52f0305b956eee01a4d#L2224



 Comments   
Comment by Githook User [ 19/Dec/18 ]

Author:

{'username': 'skriptble', 'email': 'kris@mongodb.com', 'name': 'Kris Brandow'}

Message: Close conn when driver.KillCursors returns

GODRIVER-715

Change-Id: Ie6a5b52801bdcf40579e74ded06931ff13b412e1
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/986b2043d8432d3a8a8e7f15b8512776b0fd398e

Comment by Kristofer Brandow (Inactive) [ 18/Dec/18 ]

Code Review: https://review.gerrithub.io/c/mongodb/mongo-go-driver/+/437718.

Generated at Thu Feb 08 08:34:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.