[JAVA-2941] Use wire version instead of server version to detect wire protocol changes Created: 23/Aug/18  Updated: 28/Oct/23  Resolved: 04/Dec/18

Status: Closed
Project: Java Driver
Component/s: Wire Protocol
Affects Version/s: 3.8.1
Fix Version/s: 3.10.0

Type: Improvement Priority: Major - P3
Reporter: Louis Williams Assignee: Jeffrey Yemin
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

When using sessions like they are used in this code, if the server's buildInfo indicates it does not support sessions, in my case 0.0.0 in a development build, the driver will silently fail. As a consequence, the driver accepted my configuration for sessions with causal consistency, but did not provide me causally consistent reads.

Using buildInfo to check for features appears to contradict the specification for How to Check Whether a Deployment Supports Sessions. The driver should either report an error in this case or not depend on buildInfo for feature support.



 Comments   
Comment by Githook User [ 14/Jan/19 ]

Author:

{'username': 'jyemin', 'email': 'jeff.yemin@10gen.com', 'name': 'Jeff Yemin'}

Message: Fix a few remaining unit tests

These are unit tests hiding in a functional test spec that only runs
on server versions >= 3.6. Fix them to use getMaxWireVersion instead
of getServerVersion in ConnectionDescription mocks

JAVA-2941
Branch: 3.10.x
https://github.com/mongodb/mongo-java-driver/commit/675c7419e6972e36b1b8854a45a01b2aaa1c08fb

Comment by Githook User [ 14/Jan/19 ]

Author:

{'username': 'jyemin', 'email': 'jeff.yemin@10gen.com', 'name': 'Jeff Yemin'}

Message: Add maxWireVersion property to ConnectionDescription

The maxWireVersion becomes a ConnectionDescription property, which is now
used by the driver instead of serverVersion to determine what wire protocol
to use in all situations.

JAVA-2941
Branch: 3.10.x
https://github.com/mongodb/mongo-java-driver/commit/a60c0cd9f7754ee16325d28c3ee75dd89f3c61eb

Comment by Githook User [ 04/Dec/18 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@10gen.com', 'username': 'jyemin'}

Message: Fix a few remaining unit tests

These are unit tests hiding in a functional test spec that only runs
on server versions >= 3.6. Fix them to use getMaxWireVersion instead
of getServerVersion in ConnectionDescription mocks

JAVA-2941
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/e9e8326eec287ff547575ac75d26042494cd868e

Comment by Githook User [ 04/Dec/18 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@10gen.com', 'username': 'jyemin'}

Message: Add maxWireVersion property to ConnectionDescription

The maxWireVersion becomes a ConnectionDescription property, which is now
used by the driver instead of serverVersion to determine what wire protocol
to use in all situations.

JAVA-2941
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/2bed66f3f86fa32ac5464bbf22d5fb304a0e5d27

Generated at Thu Feb 08 08:58:25 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.