Skip to content

Mongo srv seedlist - #2889

Open
gedaiu wants to merge 9 commits into
vibe-d:masterfrom
gedaiu:mongo-srv-seedlist
Open

Mongo srv seedlist#2889
gedaiu wants to merge 9 commits into
vibe-d:masterfrom
gedaiu:mongo-srv-seedlist

Conversation

@gedaiu

@gedaiu gedaiu commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Hey @s-ludwig! This builds on the load-balancer PR and adds DNS seedlist discovery — the mongodb+srv:// connection string scheme.

It resolves the _mongodb._tcp SRV records (and the TXT connection options) for the host into a seedlist, defaults TLS on for +srv URIs, and enforces the scheme's rules (exactly one host, no explicit port). The live DNS lookups are bound through vibe.core.dns, degrading gracefully when linked against a vibe-core without DNS support.

It's stacked on mongo-load-balanced — srv reuses the load-balancer config validation, so that PR needs to land first. The diff here is just the srv feature (one new module, the URL scheme parsing + field, the client resolver hook, and unit tests).

Builds clean and all unit tests pass.

Closes #2859
Merge after #2864

gedaiu added 9 commits June 17, 2026 16:30
…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
Adds change streams via watch() on MongoClient (whole deployment), MongoDatabase (all collections), and MongoCollection. The returned ChangeStream input range tracks resume tokens and automatically resumes on transient/resumable errors; requires a replica set or sharded cluster.

Stacked on mongo-sessions-and-transactions.

Closes vibe-d#2860
Adds MongoClient.bulkWrite() — the MongoDB 8.0 server-level bulkWrite command spanning multiple collections and databases in a single request. Builds the command, drains the result cursor via getMore (killing it on a mid-drain failure), and parses the summary plus per-operation verbose results; honours ordered/verboseResults/writeConcern and surfaces partial results on error.

Stacked on mongo-change-streams.

Closes vibe-d#2861
Adds GridFS support via GridFSBucket for storing and retrieving large files as chunked documents: upload/download, chunk split and assembly, and the files/chunks collection bookkeeping with their indexes.

Stacked on mongo-client-bulkwrite.

Closes vibe-d#2862

Merge after vibe-d#2861
Adds the CSFLE configuration and data model: AutoEncryptionOptions, ClientEncryption with a key-vault integration, a MongoCryptProvider seam, KeyVault for managing data encryption keys, and EncryptOptions/DataKeyOptions — plus a MongoClientSettings.autoEncryption field to opt in.

Stacked on mongo-gridfs.

Closes vibe-d#2863

Merge after vibe-d#2862
Adds MongoDB Stable API support: a serverApi configuration (apiVersion / apiStrict / apiDeprecationErrors) parsed from the connection string into MongoClientSettings.serverApi and applied to every command — including the handshake hello — by the connection.

Stacked on mongo-csfle.

Closes vibe-d#2858

Merge after vibe-d#2863
Adds load-balancer mode (loadBalanced=true): the driver fixes the topology to the single configured host without SDAM probing, advertises loadBalanced in the handshake, enforces the server-provided serviceId, and infers MONGODB-X509 auth from a client-cert-without-password configuration.

Stacked on mongo-stable-api.

Closes vibe-d#2864

Merge after vibe-d#2858
Adds DNS seedlist discovery: the mongodb+srv:// scheme resolves SRV records (and TXT connection options) into a host seedlist, defaults TLS on, and enforces the single-host / no-explicit-port rules of the +srv URI form.

Stacked on mongo-load-balanced.

Closes vibe-d#2859

Merge after vibe-d#2864
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[vibe-d/mongodb] [important] [mongo8] No mongodb+srv:// connection string support

1 participant