GODRIVER-3612 Add an internal-only NewSessionWithLSID API (v1)#2183
Merged
matthewdale merged 2 commits intoSep 5, 2025
Merged
Conversation
Contributor
API Change ReportNo changes found! |
810363d to
f51a5c3
Compare
f51a5c3 to
986a23e
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds an internal-only API mongo.NewSessionWithLSID that creates a MongoDB session with a specified session ID document. This functionality is intended for internal use cases where control over the session ID is needed.
- Introduces
NewSessionWithLSIDfunction that accepts a client and session ID document - Adds comprehensive integration tests to verify the API works correctly and enforces expected limitations
- Updates build configuration to include the
mongointernalbuild tag for testing
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| mongo/mongointernal.go | Implements the new NewSessionWithLSID function with proper documentation and build constraints |
| mongo/integration/mongointernal_test.go | Adds integration tests covering normal usage and expected panic behaviors |
| .evergreen/config.yml | Updates build tags to include mongointernal for CI testing |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
prestonvasquez
approved these changes
Sep 5, 2025
alcaeus
added a commit
that referenced
this pull request
Sep 22, 2025
* release/1.17: GODRIVER-3612 Add an internal-only NewSessionWithLSID API (v1) (#2183) Consider HTTP 429 a succcessful response in the Markdown link check. (#2191) Pin drivers-evergreen-tools to rev 98f6b0e in v1. (#2184) Retry Markdown link checks on HTTP 429 (v1) (#2186)
This was referenced Sep 25, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GODRIVER-3612
Summary
Add an internal-only API
mongo.NewSessionWithLSIDthat returns aSessionfor the specifiedClientand session ID document.Background & Motivation