[CSHARP-3480] Switch to using maxWireVersion rather than buildInfo to determine feature support Created: 15/Mar/21 Updated: 28/Oct/23 Resolved: 20/Jan/22 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | Internal |
| Affects Version/s: | None |
| Fix Version/s: | 2.15.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | James Kovacs | Assignee: | Dmitry Lukyanov (Inactive) |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | size-small | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Major Change | ||||||||||||
| Description |
|
The .NET/C# Driver calls buildInfo to determine the connected server's semantic version and then uses that information in src/MongoDB.Driver.Core/Core/Misc/Feature.cs to determine whether a feature is supported. The Java Driver used to do this too but switched to maxWireVersion from isMaster/hello to determine feature support in the 4.0 release of the Java driver. We should consider this change for the 3.0 of the .NET/C# driver as C# is now the only driver that calls buildInfo and uses it in this way. |
| Comments |
| Comment by Githook User [ 20/Jan/22 ] |
|
Author: {'name': 'Dmitry Lukyanov', 'email': 'dmitry.lukyanov@mongodb.com', 'username': 'DmitryLukyanov'}Message:
|
| Comment by A. Jesse Jiryu Davis [ 03/Jun/21 ] |
|
I'd strongly recommend that the C# Driver stops calling buildinfo in the next major release. It would match the Handshake Spec that the other drivers follow. It's more important now because "hello" and other handshake commands are in API Version 1, but buildinfo is not in V1. We want to ensure, with the Versioned API, that MongoDB 5.0 drivers will be future-compatible with all future MongoDB releases for many years (until we eventually drop API V1). Therefore we included all the commands mentioned in drivers specs in V1. But with the C# driver depending the buildinfo command, we can't make that future-compatibility guarantee for C#. |