[SERVER-7181] Assertion: 13111:field not found, expected type 2 when an error occured during the index building phase in restore Created: 27/Sep/12  Updated: 11/Jul/16  Resolved: 02/Oct/12

Status: Closed
Project: Core Server
Component/s: Tools
Affects Version/s: 2.2.0
Fix Version/s: 2.2.1, 2.3.0

Type: Bug Priority: Major - P3
Reporter: Randolph Tan Assignee: Randolph Tan
Resolution: Done Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
is related to SERVER-7160 Mongorestore doesn't auth against adm... Closed
Operating System: ALL
Participants:

 Description   

Before SERVER-7160 was fixed, doing a restore on a server with auth enabled with the correct username and password for a single DB other than the admin db will trigger this assertion. This is caused by the restore code trying to print out the "need to login" error message but because of this bug in the logging code, this assertion came out instead.

Offending code @ restore.cpp, createIndex():

if ( ! ( err["err"].isNull() ) ) {
    if (err["err"].String() == "norepl" && _w > 1) {

condition should probably be

if (err.hasField("err")) {
 ...
}
else if (err.hasField("errmsg")) {

and

if (err["err"].str() == "norepl" ...



 Comments   
Comment by auto [ 03/Oct/12 ]

Author:

{u'date': u'2012-10-02T19:06:43-07:00', u'email': u'milkie@10gen.com', u'name': u'Eric Milkie'}

Message: SERVER-7181 fix build - assert code conflict
Branch: v2.2
https://github.com/mongodb/mongo/commit/e76de3ccd440962bec402d7b47f238e596fccad7

Comment by auto [ 03/Oct/12 ]

Author:

{u'date': u'2012-10-02T08:11:44-07:00', u'email': u'randolph@10gen.com', u'name': u'Randolph Tan'}

Message: SERVER-7181 Fix error reporting in mongorestore during index build
Branch: v2.2
https://github.com/mongodb/mongo/commit/a84fe318f8331ee687ce9232d60adffd5930489c

Comment by auto [ 03/Oct/12 ]

Author:

{u'date': u'2012-10-02T19:06:43-07:00', u'email': u'milkie@10gen.com', u'name': u'Eric Milkie'}

Message: SERVER-7181 fix build - assert code conflict
Branch: master
https://github.com/mongodb/mongo/commit/8ac89940f1d08b5b8cfd5bf3eeaa0d988c6a3dd4

Comment by auto [ 02/Oct/12 ]

Author:

{u'date': u'2012-10-02T08:11:44-07:00', u'email': u'randolph@10gen.com', u'name': u'Randolph Tan'}

Message: SERVER-7181 Fix error reporting in mongorestore during index build
Branch: master
https://github.com/mongodb/mongo/commit/61c48050205153187fb0a2ea40b9b6c417963c52

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