[SERVER-31826] Add command response and write concern error parsing of 'data' to RemoteCommandResponse constructors if send status isOK Created: 03/Nov/17  Updated: 06/Dec/22  Resolved: 17/Apr/18

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Dianna Hohensee (Inactive) Assignee: [DO NOT USE] Backlog - Sharding Team
Resolution: Won't Fix Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Sharding
Participants:

 Description   

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.



 Comments   
Comment by Kaloian Manassiev [ 17/Apr/18 ]

The networking executor model is in being changed currently and this ticket might not be relevant anymore depending on the model we choose, so closing this ticket.

Generated at Thu Feb 08 04:28:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.