When they receive a writeConcernError, write commands should return a response with the format:
Unable to find source-code formatter for language: javascript. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
{ 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.
- is related to
-
SERVER-28871 Remove write concern error backwards compatibility for user management commands
- Closed