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

fix(NODE-5750): RTTPinger always sends legacy hello #3922

Merged
merged 3 commits into from
Nov 16, 2023

Conversation

nbbeeken
Copy link
Contributor

Description

What is changing?

  • Adds serverApi and helloOk logic to RTTPinger
  • Calls destory on connection when an error is recv-ed
  • Replaced symbol properties with string properties
Is there new documentation needed for these changes?

No

What is the motivation for this change?

Fixes a connection leak when serverApi is enabled.

Release Highlight

Fix connection leak when serverApi is enabled

When enabling serverApi the driver's RTT mesurment logic (used to determine the closest node) still sent the legacy hello command "isMaster" causing the server to return an error. Unfortunately, the error handling logic did not correctly destroy the socket which would cause a leak.

Both sending the correct hello command and the error handling connection clean up logic are fixed in this change.

Double check the following

  • Ran npm run check:lint script
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@nbbeeken nbbeeken marked this pull request as ready for review November 15, 2023 15:40
@durran durran self-assigned this Nov 15, 2023
@durran durran added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Nov 15, 2023
@dariakp dariakp assigned dariakp and unassigned durran Nov 16, 2023
@dariakp dariakp merged commit 8e56872 into 5.x Nov 16, 2023
20 of 26 checks passed
@dariakp dariakp deleted the NODE-5750-rtt-serverApi-5.x branch November 16, 2023 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Primary Review In Review with primary reviewer, not yet ready for team's eyes
Projects
None yet
3 participants