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: update sh.xxxBalancing to use configureCollectionBalancing MONGOSH-1932 #2394

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nirinchev
Copy link
Contributor

@nirinchev nirinchev commented Mar 4, 2025

This updates sh.(enable|disable)Balancing to use the configureCollectionBalancing admin command on 8.1+ servers.

Implementation should be mostly done - I'd like to get confirmation that using the server version is the right way to distinguish, as well as add an integration test for it.

(await this._instanceState.fetchConnectionInfo())
)?.extraInfo?.server_version;

if (serverVersion && semver.gte(serverVersion, '8.1.0-alpha3')) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Did we get an answer from the server team regarding how they'd prefer for us to do feature detection?

I think if we were to rely on a server version check, it would still be better to use the wire version – the only downside is that it's not granular enough to distinguish between "8.0 without a backport of this feature" and "8.0 with a backport of this feature"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey, yeah, I wasn't sure if I understood you correctly about the wire version - originally I thought you meant the max supported wire protocol version, but then reached the same conclusion that we wouldn't know if we're connecting to 8.0.x that has the backport or not. Let's see what we come up with tomorrow and will update this check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants