feat: update sh.xxxBalancing to use configureCollectionBalancing MONGOSH-1932#2394
feat: update sh.xxxBalancing to use configureCollectionBalancing MONGOSH-1932#2394
Conversation
| (await this._instanceState.fetchConnectionInfo()) | ||
| )?.extraInfo?.server_version; | ||
|
|
||
| if (serverVersion && semver.gte(serverVersion, '8.1.0-alpha3')) { |
There was a problem hiding this comment.
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"
There was a problem hiding this comment.
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.
This updates
sh.(enable|disable)Balancingto use theconfigureCollectionBalancingadmin 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.