Skip to content

fix(data-service): remove compass connectivity check via ping COMPASS-9455#7897

Merged
nbbeeken merged 9 commits intomainfrom
COMPASS-9455
Apr 2, 2026
Merged

fix(data-service): remove compass connectivity check via ping COMPASS-9455#7897
nbbeeken merged 9 commits intomainfrom
COMPASS-9455

Conversation

@nbbeeken
Copy link
Copy Markdown
Collaborator

Description

We now use a driver version that does connection checkout/in verifying connectivity and auth in the connect method!! -1 RTT. huge!

Checklist

  • New tests and/or benchmarks are included
  • Documentation is changed or added
  • If this change updates the UI, screenshots/videos are added and a design review is requested
  • If this change could impact the load on the MongoDB cluster, please describe the expected and worst case impact
  • I have signed the MongoDB Contributor License Agreement (https://www.mongodb.com/legal/contributor-agreement)

Motivation and Context

  • Bugfix
  • New feature
  • Dependency update
  • Misc

Open Questions

Dependents

Types of changes

  • Backport Needed
  • Patch (non-breaking change which fixes an issue)
  • Minor (non-breaking change which adds functionality)
  • Major (fix or feature that would cause existing functionality to change)

@nbbeeken nbbeeken requested a review from a team as a code owner March 23, 2026 21:19
@nbbeeken nbbeeken requested review from Copilot and lerouxb and removed request for Copilot March 23, 2026 21:19
@github-actions github-actions bot added the fix label Mar 23, 2026
Copilot AI review requested due to automatic review settings March 23, 2026 21:34
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Removes the explicit post-connect ping round-trip in data-service so connections rely on the driver’s connect() verification, reducing one RTT during connection establishment.

Changes:

  • Removed the runCommand(..., { ping: 1 }) connectivity check after creating a client.
  • Updated the test suite by removing the ping/readPreference-specific assertion and associated type import cleanup.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/data-service/src/connect-mongo-client.ts Drops the explicit ping command executed right after connectMongoClient() completes.
packages/data-service/src/connect-mongo-client.spec.ts Removes a ping-specific test and cleans up now-unused MongoDB event typing.

Copy link
Copy Markdown
Collaborator

@gribnoysup gribnoysup left a comment

Choose a reason for hiding this comment

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

Not a bad suggestion to add a new test for this, otherwise lgtm

@nbbeeken
Copy link
Copy Markdown
Collaborator Author

Depends on: mongodb-js/devtools-shared#628

@nbbeeken
Copy link
Copy Markdown
Collaborator Author

nbbeeken commented Apr 2, 2026

chrome passed the same tests that failed of firefox here, and main is red right now too so I think they are flakes

@nbbeeken nbbeeken merged commit 83a4a62 into main Apr 2, 2026
76 of 79 checks passed
@nbbeeken nbbeeken deleted the COMPASS-9455 branch April 2, 2026 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants