Skip to content

CSHARP-5688: Bump maxWireVersion for MongoDB 8.3 #1746

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

adelinowona
Copy link
Contributor

No description provided.

@adelinowona adelinowona requested a review from a team as a code owner August 1, 2025 18:32
@adelinowona adelinowona requested review from papafe and removed request for a team August 1, 2025 18:32
@adelinowona adelinowona added the chore Label to hide PR from generated Release Notes label Aug 1, 2025
@adelinowona adelinowona requested review from sanych-sun and removed request for papafe August 1, 2025 18:33
Copy link
Member

@sanych-sun sanych-sun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -189,7 +194,8 @@ public static ServerVersion ToServerVersion(this int wireVersion)
WireVersion.Server80 => ServerVersion.Server80,
WireVersion.Server81 => ServerVersion.Server81,
WireVersion.Server82 => ServerVersion.Server82,
_ => throw new ArgumentException($"Invalid write version: {wireVersion}.", nameof(wireVersion))
WireVersion.Server83 => ServerVersion.Server83,
_ => throw new ArgumentException($"Invalid wire version: {wireVersion}.", nameof(wireVersion))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need something like a MongoConnectionException and a better error message telling the user what to do, something like:

This version of the driver is not compatible with the version of the server.

We could add "Either use a newer version of the driver or an older version of the server" but I think the problem could happen at the other end also, so that might not be accurate... it could be "either use an older version of the driver or a newer version of the server".

We can probably tell which error message to add based on whether the unknown wire version is too large or too small.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Label to hide PR from generated Release Notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants