[SERVER-18334] Rewrite 'transport error' exceptions in DBCollection.runCommand to old error to prevent test breakage Created: 05/May/15  Updated: 19/Sep/15  Resolved: 11/May/15

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: 3.1.2
Fix Version/s: 3.1.3

Type: Bug Priority: Major - P3
Reporter: Kamran K. Assignee: Adam Midvidy
Resolution: Done Votes: 0
Labels: UT
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Duplicate
Related
is related to SERVER-18198 runCommand in the shell should use na... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:
Linked BF Score: 0

 Description   

The regression test for SERVER-17671 (initial_sync_unsupported_auth_schema.js) can fail with a 'transport error' during reInitiate(). This occurs when DBClientInterface::findN fails to construct a cursor due to an aborted node.

2015-05-05T01:35:10.734-0400 E QUERY    Error: DBClientBase::findN: transport error: 127.0.0.1:31002 ns: admin.$cmd query: { ismaster: 1.0 }
    at DB.runCommand (src/mongo/shell/db.js:112:29)
    at src/mongo/shell/replsettest.js:358:55
    at Function.assert.soon (src/mongo/shell/assert.js:183:17)
    at ReplSetTest.awaitSecondaryNodes (src/mongo/shell/replsettest.js:351:10)
    at ReplSetTest.initiate (src/mongo/shell/replsettest.js:460:10)
    at ReplSetTest.reInitiate (src/mongo/shell/replsettest.js:475:10)
    at checkedReInitiate (/srv/10gen/mci-exec/mci/shell/src/jstests/replsets/initial_sync_unsupported_auth_schema.js:6:13)
    at testInitialSyncAbortsWithUnsupportedAuthSchema (/srv/10gen/mci-exec/mci/shell/src/jstests/replsets/initial_sync_unsupported_auth_schema.js:40:5)
    at /srv/10gen/mci-exec/mci/shell/src/jstests/replsets/initial_sync_unsupported_auth_schema.js:91:1 at /srv/10gen/mci-exec/mci/shell/src/jstests/replsets/initial_sync_unsupported_auth_schema.js:16



 Comments   
Comment by Githook User [ 11/May/15 ]

Author:

{u'username': u'amidvidy', u'name': u'Adam Midvidy', u'email': u'amidvidy@gmail.com'}

Message: SERVER-18334 preserve existing error message if runCommand fails due to connection failure
Branch: master
https://github.com/mongodb/mongo/commit/b947b518aaf793c0fdba8c9efdf7e0bc15e0368a

Comment by Eric Milkie [ 06/May/15 ]

This behavior apparently changed after Adam's commit for the runCommand work. It no longer catches the uassert from the C++ driver and converts it to a Javascript exception with the text "query failed".

I am not sure we should now go through and change all the js tests piecemeal to handle the new error cases. I suspect we can make a simple change to db.js instead, which will have the added benefit of backwards compatibility.

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