[SERVER-18764] Only use elapsedMillis when command succeeds Created: 01/Jun/15 Updated: 25/Jan/17 Resolved: 04/Jun/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code, Replication |
| Affects Version/s: | 3.1.3 |
| Fix Version/s: | 3.1.4 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Adam Midvidy | Assignee: | Siyuan Zhou |
| Resolution: | Done | Votes: | 0 |
| Labels: | UT | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Description |
According to mattd@10gen.com, the implementation of the ReplicationCoordinatorImpl relies on the ability to retrieve the elapsedTimeMillis field of a RemoteCommandResponse even if the command failed. In that case the layout of RemoteCommandResponse could potentially be changed to:
or elapsedMillis could be stored directly in the RemoteCommandCallbackData instead. |
| Comments |
| Comment by Githook User [ 04/Jun/15 ] | |||
|
Author: {u'username': u'visualzhou', u'name': u'Siyuan Zhou', u'email': u'siyuan.zhou@mongodb.com'}Message: | |||
| Comment by Scott Hernandez (Inactive) [ 03/Jun/15 ] | |||
|
As noted, this code can be changed to remove the section reading the invalid data, without further changes:
And if a case comes up where we need the error and network round-trip time we can re-address adding that to the RemoteCommandResponse. | |||
| Comment by Andy Schwerin [ 01/Jun/15 ] | |||
|
I like the idea of changing RemoteCommandResponse to contain a StatusWith<BSONObj> and a Milliseconds field. | |||
| Comment by Adam Midvidy [ 01/Jun/15 ] | |||
|
For details: see this failing build of |