Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-3011

Docs around SessionContext and parallelism could be more explicit

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Do
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      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?
       

            Assignee:
            preston.vasquez@mongodb.com Preston Vasquez
            Reporter:
            nate@greatcloak.com Nate Starun
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: