Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PYTHON-4960 More informative error message for stale primary #2115

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ShaneHarvey
Copy link
Member

@ShaneHarvey ShaneHarvey commented Jan 31, 2025

PYTHON-4960 More informative error message for stale primary

Implementation of mongodb/specifications#1729

Here's an example of the new TopologyDescriptions:
<TopologyDescription id: 67a69a832fcee4d4e6ab748f, topology_type: ReplicaSetWithPrimary, servers: [<ServerDescription ('a', 27017) server_type: Unknown, rtt: None, error=PyMongoError('primary marked stale due to discovery of newer primary')>, <ServerDescription ('b', 27017) server_type: RSPrimary, rtt: 0>]>

and

<TopologyDescription id: 67a69a832fcee4d4e6ab7491, topology_type: ReplicaSetWithPrimary, servers: [<ServerDescription ('a', 27017) server_type: Unknown, rtt: None, error=PyMongoError("primary marked stale due to electionId/setVersion mismatch, (ObjectId('000000000000000000000001'), 1) is stale compared to (ObjectId('000000000000000000000001'), 2)")>, <ServerDescription ('b', 27017) server_type: RSPrimary, rtt: 0>]>

@ShaneHarvey
Copy link
Member Author

Depends on #2093

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.

1 participant