-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
feat: support hedged reads #2350
feat: support hedged reads #2350
Conversation
Adds driver support for server Hedged Reads. Adds `hedge` property to the `ReadPreference` class and exports it using the `.toJSON` method. Introduces `withMonitoredClient` a shared testing utility for testing command monitoring. Tests command sent to the server and verifies that `hedge` property was propagated. Tests are only run on `>=3.6.0` due to how prior versions send operations to the server. NODE-2510
test/functional/shared.js
Outdated
client.connect((err, client) => { | ||
expect(err).to.not.exist; | ||
const d = function() { | ||
const args = Object.values(arguments); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is different than what made it into 3.6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Completed manual review]
Adds driver support for server Hedged Reads. Adds
hedge
property to theReadPreference
class and exports it using the.toJSON
method. IntroduceswithMonitoredClient
a shared testing utility for testing command monitoring. Tests command sent to the server and verifies thathedge
property was propagated. Tests are only run on>=3.6.0
due to how prior versions send operations to the server.NODE-2510