Skip to content
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

Merged

Conversation

reggi
Copy link
Contributor

@reggi reggi commented May 4, 2020

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

Thomas Reggi added 4 commits May 4, 2020 17:59
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
client.connect((err, client) => {
expect(err).to.not.exist;
const d = function() {
const args = Object.values(arguments);
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch

Copy link
Contributor Author

@reggi reggi left a comment

Choose a reason for hiding this comment

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

[Completed manual review]

@reggi reggi requested review from emadum and mbroadst May 5, 2020 16:25
@reggi reggi merged commit 2b7b936 into master May 5, 2020
@reggi reggi deleted the NODE-2510/master/driver-support-for-server-hedged-reads branch May 5, 2020 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants