-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
None
-
Go Drivers
-
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
- related to
-
GODRIVER-3663 Expose atClusterTime parameter in snapshot sessions
-
- In Code Review
-