Client sessions, multi-document transactions, and retryable writes - #2883
Open
gedaiu wants to merge 2 commits into
Open
Client sessions, multi-document transactions, and retryable writes#2883gedaiu wants to merge 2 commits into
gedaiu wants to merge 2 commits into
Conversation
…nitoring, primary write-routing Reworks the MongoDB driver onto a Server Discovery and Monitoring (SDAM) foundation: single-pass topology discovery, background health monitoring, writes routed to the primary, per-query read preferences, and read-preference tag server selection. Adds the wire/codec and topology infrastructure (serverdescription, monitor, wire, wireversion, compression, commands, clustertime) and reworks connection/client/collection/database/cursor onto it. Base of a stacked series: client sessions, multi-document transactions and retryable writes follow in the next PR, and the self-contained MongoDB 8 features (change streams, client bulkWrite, GridFS, CSFLE, Stable API, mongodb+srv, load-balancer mode) as PRs on top of that. Closes vibe-d#2845, vibe-d#2847, vibe-d#2848, vibe-d#2849, vibe-d#2851
…writes Adds client session support (logical session ids backed by a server session pool), multi-document transactions (start/commit/abort), and retryable writes — including write retry when the primary steps down — on top of the SDAM core. Stacked on mongo-driver-core-improvements. Closes vibe-d#2850, vibe-d#2854, vibe-d#2855, vibe-d#2856
This was referenced Jun 17, 2026
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.
Hey @s-ludwig! This builds on the SDAM core PR (mongo-driver-core-improvements) and adds the transactional layer of the MongoDB 8 driver.
It introduces client session support (logical session IDs backed by a server session pool) and then layers multi-document transactions (start / commit / abort) and retryable writes on top, including automatic write retries when the primary steps down.
It's stacked on mongo-driver-core-improvements, so please review that one first; the diff here is just the sessions/transactions/retryable-writes layer.
Builds clean and all unit tests pass.
Closes #2850, #2854, #2855, #2856
merge after #2882
Thanks for taking a look!