[SERVER-12489] add a check for server version to shell and highlight mismatch Created: 27/Jan/14  Updated: 08/Jan/24  Resolved: 23/May/16

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: None
Fix Version/s: 3.3.8

Type: Improvement Priority: Major - P3
Reporter: Asya Kamsky Assignee: Joanna Cheng
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Platforms 15 (06/03/16)
Participants:

 Description   

It would be nice to flag if the shell version if different than server (major version) something functionally equivalent to:

> if( dbv.slice(0,3)!=shv.slice(0,3)) print ("mismatched versions");
mismatched versions
> db.version()
2.4.5
> version()
2.5.4

We already print the shell version and that can easily be mistaken by someone for server version.

Just printing server version would help just by itself...

MongoDB shell version: 2.5.4
connecting to: test
MongoDB server version: 2.4.5



 Comments   
Comment by Githook User [ 23/May/16 ]

Author:

{u'username': u'joannac-', u'name': u'Joanna Cheng', u'email': u'joanna@mongodb.com'}

Message: SERVER-12489 Make shell warn if version does not match server's

Closes #1085

Signed-off-by: Mark Benvenuto <mark.benvenuto@mongodb.com>
Branch: master
https://github.com/mongodb/mongo/commit/04819884c69dc0ead7611e0a77c824dfbf1b8117

Comment by Daniel Pasette (Inactive) [ 27/Jan/14 ]

It's easy to detect and I think it might be quite helpful to do this for 2.6 even though a 2.4 shell should work just fine with a 2.6 mongod or mongos.

Generated at Thu Feb 08 03:28:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.