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

Merged
merged 2 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
@dariakp dariakp self-requested a review November 16, 2023 17:26
@dariakp dariakp self-assigned this Nov 16, 2023
@dariakp dariakp added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Nov 16, 2023
@dariakp dariakp merged commit bc3d020 into 4.x Nov 16, 2023
7 of 22 checks passed
@dariakp dariakp deleted the NODE-5751-rtt-serverApi-4.x branch November 16, 2023 19:02
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
Development

Successfully merging this pull request may close these issues.

2 participants