-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Server Selection
To check if a server supports a specific feature, the driver has a ServerCapabilities object that exists on the Topology via the capabilities property. This should be refactored to exist on the Server object, not the Topology (due to clusters being able to have mixed server versions), and then update all driver checks for server features to use this. This will be removed in V7 (NODE-5545).
We have a util maxWireVersion function that we apply to Connection, Topology, and Server; we also have CMAP constants that map wire versions to capabilities; it would be nice if we could centralize the capabilities in general so that we don't have one-off wire version checks littered about the codebase
AC:
- Determine all areas of the driver that check for server specific features
- Propose and POC an approach (or two) to centralizing the wire version feature logic so that it's easier to maintain and remove as it becomes unnecessary with future bumps to our min supported wire version