[SERVER-12743] shell doesn't test server version on reconnect Created: 14/Feb/14  Updated: 10/May/22

Status: Backlog
Project: Core Server
Component/s: Shell, Usability
Affects Version/s: 2.5.5
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Asya Kamsky Assignee: DO NOT USE - Backlog - Platform Team
Resolution: Unresolved Votes: 0
Labels: move-sa, platforms-re-triaged
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-12933 v2.6 shell incompatible with server v... Closed
is duplicated by SERVER-14571 adding tags on 2.4 config DB from 2.6... Closed
Related
is related to SERVER-38718 mongo shell does not re-check for sta... Closed
Operating System: ALL
Participants:

 Description   

test@test:PRIMARY(2.5.5) > for (i=0;i<10;i++) db.foo.insert({test:"test"+i})
2014-02-14T11:28:25.664-0800 DBClientCursor::init call() failed
2014-02-14T11:28:25.666-0800 Error: error doing query: failed at src/mongo/shell/query.js:81
2014-02-14T11:28:25.668-0800 trying reconnect to 127.0.0.1:40001 (127.0.0.1) failed
2014-02-14T11:28:25.668-0800 reconnect 127.0.0.1:40001 (127.0.0.1) ok
test@test:PRIMARY(2.4.8) > for (i=0;i<10;i++) db.foo.insert({test:"test"+i})
2014-02-14T11:28:27.415-0800 batch failed, cannot aggregate results: no such cmd: insert at src/mongo/shell/batch_api.js:612
test@test:PRIMARY(2.4.8) >
test@test:PRIMARY(2.4.8) >
test@test:PRIMARY(2.4.8) > for (i=0;i<10;i++) db.foo.insert({test:"test"+i})
2014-02-14T11:28:32.270-0800 batch failed, cannot aggregate results: no such cmd: insert at src/mongo/shell/batch_api.js:612
test@test:PRIMARY(2.4.8) > db.foo.insert({test:"test1"})
2014-02-14T11:28:39.309-0800 batch failed, cannot aggregate results: no such cmd: insert at src/mongo/shell/batch_api.js:612
test@test:PRIMARY(2.4.8) > exit
bye
asyasmacbook:scripts asya13$ mongo --port 40001
MongoDB shell version: 2.5.5
connecting to: 127.0.0.1:40001/test
test@test:PRIMARY(2.4.8) > db.foo.insert({test:"test1"})
Inserted 1 record(s) in 5ms
test@test:PRIMARY(2.4.8) >

Without exiting the shell, it was trying to speak 2.5.5 even though the server was now 2.4.8



 Comments   
Comment by Steven Vannelli [ 10/May/22 ]

Moving this ticket to the Backlog and removing the "Backlog" fixVersion as per our latest policy for using fixVersions.

Comment by Daniel Pasette (Inactive) [ 04/Mar/14 ]

this is harder than it looks to implement in a general way.

Comment by Scott Hernandez (Inactive) [ 21/Feb/14 ]

Nope, not covered there. We have no reconnect/rediscovery logic right now. We need to add something in c++/connection-pool I believe.

Comment by Daniel Pasette (Inactive) [ 21/Feb/14 ]

I believe this will be fixed in SERVER-12786 when we make all writes go through the bulk api... Confirming with scott if this is a duplicate.

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