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

Investigate updating documentation for CommitTransaction

    • Type: Icon: Task Task
    • 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?

      Context

      GODRIVER-2997 describes an issue where if a user passes a cancelable context into WithTransaction and cancels mid-transaction, then the transaction still completes. It is noted in in the documentation for WithTransaction that we do not honor cancelations:

      Because this method must succeed to ensure that server-side resources are properly cleaned up, context deadlines and cancellations will not be respected during this call.

      The underlying method that causes this issue is CommitTransaction. Perhaps the documentation for this method should include the context limitations.

      Definition of done

      The following questions should be answered and documented:

      1. Can you cancel a context while committing a transaction? If yes, what is the difference between doing that and using WithTransaction, which is a convenience wrapper for CommitTransaction.
      2. If you can't use the functionality of a context on CommitTransaction and WithTransaction, what is the purpose of passing a context to these methods?

      What must be done to consider the task complete?

      Pitfalls

      What should the implementer watch out for? What are the risks?

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

              Created:
              Updated:
              Resolved: