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

Review error handling

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Incomplete
    • Icon: Minor - P4 Minor - P4
    • None
    • Backlog
    • Usability
    • None

    Description

      This case is intentionally vague. The basic point is that we should go through every mechanism where an error is returned to the client and try to make that error reporting as uniform as possible. Here's one example (but there are certainly more). A failed group will get picked up by a following getLastError:

      > db.runCommand({group: {$keyf: "5 ++ 5", $reduce: "", ns: "test", cond: {}, initial: {}}});

      { "errmsg" : "exception: reduce setup exec failed", "code" : 10228, "ok" : 0 } > db.runCommand("getLastError"); { "err" : "reduce setup exec failed", "code" : 10228, "n" : 0, "ok" : 1 }

      A failed M/R won't:

      > db.runCommand(

      {mapReduce: "test", map: "5 ++ 5", reduce: ""}

      );

      { "assertion" : "map compile failed: JS Error: SyntaxError: syntax error reduce setup:0", "assertionCode" : 9012, "errmsg" : "db assertion failure", "ok" : 0 } > db.runCommand("getLastError"); { "err" : null, "n" : 0, "ok" : 1 }

      Please add comments w/ any additional specific inconsistencies.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mike Michael Dirolf
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: