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-5749): RTTPinger always sends legacy hello #3921

Merged
merged 11 commits into from
Nov 15, 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 10, 2023 20:49
@durran durran self-assigned this Nov 10, 2023
@durran durran added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Nov 10, 2023
durran
durran previously approved these changes Nov 10, 2023
@nbbeeken nbbeeken added Team Review Needs review from team and removed Primary Review In Review with primary reviewer, not yet ready for team's eyes labels Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team Review Needs review from team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants