[GODRIVER-2588] Run Close in cursor.All with context.Background Created: 13/Oct/22  Updated: 25/Oct/22  Resolved: 25/Oct/22

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

Type: Improvement Priority: Major - P3
Reporter: Benji Rewis (Inactive) Assignee: Benji Rewis (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: Client Side Operations Timeout
Quarter: FY23Q2, FY23Q3
Documentation Changes: Not Needed

 Description   

cursor.All defers a call to Close to make sure the cursor is closed server-side. This call to Close is done with the same context passed to All. We should run the Close call with a context.Background to close the cursor even when the original context errors during the call to All.



 Comments   
Comment by Githook User [ 25/Oct/22 ]

Author:

{'name': 'Benjamin Rewis', 'email': '32186188+benjirewis@users.noreply.github.com', 'username': 'benjirewis'}

Message: GODRIVER-2588 Run Close in cursor.All with context.Background(). (#1098)

Co-authored-by: Kevin Albertson <kevin.albertson@10gen.com>
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/8f23bf48c0f314df27b228e6210d08757da2d789

Comment by Benji Rewis (Inactive) [ 18/Oct/22 ]

https://github.com/mongodb/mongo-go-driver/pull/1098

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