Communicate command failure with exceptions, not BSONObj

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Won't Do
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Internal Code
    • None
    • Service Arch
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      An idea from schwerin as a spinoff from the "Reduce Client Time To Recovery On Topology Changes" project:

      It would be nicer if commands could only fail by throwing exceptions out of run(), which would clear the contents of the built reply and replace it with an encoding of the exception. Letting commands add their own "ok" field in the body of "run" was probably a mistake in the original design of Command which predates the BasicCommand implementation.

      The current design requires commands to encode "ok: 1" in the reply body. ServiceEntryPoint must determine command success by parsing the just-generated command body for an "ok" field.

            Assignee:
            [DO NOT USE] Backlog - Service Architecture
            Reporter:
            A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: