[GODRIVER-3011] Docs around SessionContext and parallelism could be more explicit Created: 11/Oct/23  Updated: 16/Oct/23

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

Type: Improvement Priority: Unknown
Reporter: Nate Starun Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to GODRIVER-716 SessionContext not being goroutine sa... Closed

 Description   

Bulk operations can be run "unordered" which may result in parallel op execution (doc link).

mongo.SessionContext is not safe for use in concurrent code, however (doc link).

To me, it's unclear if this means I may not perform unordered bulk writes within transactions or not ([community question link](https://www.mongodb.com/community/forums/t/sessioncontext-is-not-safe-for-use-in-goroutines-does-this-preclude-unordered-bulk-writes/248644)). I suppose it may be the case that only user-authored parallelism is unsafe, while driver-managed parallelism is handled gracefully?
 



 Comments   
Comment by PM Bot [ 11/Oct/23 ]

Hi nate@greatcloak.com, thank you for reporting this issue! The team will look into it and get back to you soon.

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