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

Add writeConcernError backwards compatibility to User Management Commands

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 3.3.5
    • None
    • Write Ops
    • None
    • Fully Compatible
    • ALL
    • Sharding 10 (02/19/16), Sharding 11 (03/11/16), Sharding 12 (04/01/16), Sharding 13 (04/22/16)

    Description

      When they receive a writeConcernError, write commands should return a response with the format:

      {
          ok: 1,
          ...
          writeConcernError: {
              code: <number>,
              errmsg: <string>
          }
      }
      

      User Managements Commands currently have a response format of

      {"ok" : 0, "errmsg" : "timeout", "code" : 8 }

      . These commands need to return the new format in addition to or instead of the old format. To do so, inside of Command::run(), when we get a writeConcernError we will simply check if the command is a UserManagementCommand and if so we will set ok to 0, and add "errmsg" and "code" fields with the errmsg and code from the writeConcernError.

      Attachments

        Activity

          People

            judah.schvimer@mongodb.com Judah Schvimer
            judah.schvimer@mongodb.com Judah Schvimer
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: