Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-7181

Assertion: 13111:field not found, expected type 2 when an error occured during the index building phase in restore

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.2.1, 2.3.0
    • Affects Version/s: 2.2.0
    • Component/s: Tools
    • None
    • ALL

      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" ...
      

            Assignee:
            randolph@mongodb.com Randolph Tan
            Reporter:
            randolph@mongodb.com Randolph Tan
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: