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

Add command response and write concern error parsing of 'data' to RemoteCommandResponse constructors if send status isOK

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Sharding
    • Labels:
    • Sharding

      In the AsyncRequestsSender::Response struct we store a RemoteCommandResponse, which in several places is then painstakingly parsed for command response, if send status is OK, check the command response, then parsed and checked for write concern errors. No doubt many other users of RemoteCommandResponse also do this.

      Instead of each user of RemoteCommandResponse handling parsing all of this, RemoteCommandResponse constructors should handle this. This will significantly reduce the complexity of handling RemoteCommandResponse objects, and lead to greater ease of understanding.

      Proposed additional fields to the struct are optional commandStatus and writeConcernErr fields, only present if isOK (send status) is true, and writeConcernErr additionally only present when there's a write concern error in the response. This is just additional parsing of the existing 'data' blob already in the RemoteCommandResponse struct.

            Assignee:
            backlog-server-sharding [DO NOT USE] Backlog - Sharding Team
            Reporter:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: