Move session implementation to internal package

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • Go Drivers
    • 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?
    • None
    • None
    • None
    • None
    • None
    • None

      Context

      Currently, the internal session implementation is located in /x/mongo/driver/session, which is technically accessible to users despite being experimental. According to the MongoDB Driver Sessions Specification, ServerSession (our session.Client) is explicitly described as "an implementation detail and does not need to be public."

      The public mongo.Session type correctly implements the spec-required ClientSession interface, but the underlying implementation should be moved to an internal package to prevent accidental user dependencies on internal session state (e.g. a reflection update of HELP-58664).

      Definition of done

      MoveĀ  /x/mongo/driver/session/ to /internal/session/

      Pitfalls

      • Users who import go.mongodb.org/mongo-driver/v2/x/mongo/driver/session will get compile errors
      • Advanced users creating driver.Operation{Client: *session.Client} manually will lose access to session.Client
      • Large refactor touching many files increases merge conflict risk

            Assignee:
            Unassigned
            Reporter:
            Preston Vasquez
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: