MongoDB: Add replica set support with automatic failover#5068
Merged
Conversation
b572b42 to
7673ae9
Compare
Member
|
@matejk you have fix for failing odbc CI in main |
cd8bbb1 to
bd123a2
Compare
…osts from "hello" only to discover replica set hosts.
…. Use notification instead.
3ecb2ea to
fda7d81
Compare
…scovered servers.
baf85a2 to
50466f4
Compare
enh(MongoDB): Remove dead code and mark Message as implementation detail. enh(CI): Fix build of C++ modules
875ffcd to
1b83973
Compare
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.
Summary
This PR adds comprehensive MongoDB replica set support to the Poco MongoDB library, implementing automatic server discovery, topology monitoring, failover handling, and read preference-based server selection.
New Features
Replica Set Connection Management
Connectionthat provides automatic retry and failover for replica set operations.Topology Discovery and Monitoring
Read Preference Support
MongoDB URI Parsing
OpMsgCursor Enhancement
ReplicaSetConnectioninOpMsgCursor.Known Limitations
Nearestread preference selects any available member but does not use RTT for latency-based selection.README-ReplicaSet.mdfor full list of SDAM specification gaps.Improvements
MongoDB::DocumentFixes
heartbeatFrequencytoheartbeatFrequencyMSto match MongoDB specificationDocumentation and Samples
README-ReplicaSet.mddocumentationTests
BSONTestsuite with comprehensive BSON serialization testsReplicaSetTestsuite covering URI parsing, topology discovery, server selection, and failover scenariosCI/Build
cmake --build --parallel 4