Only use elapsedMillis when command succeeds

XMLWordPrintableJSON

    • Fully Compatible
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Status responseStatus = cbData.response.getStatus();
      ... lots of logic ..
      if (responseStatus.isOK()) {
      .... stuff ...
      }
      else {
      ...
      networkTime = cbData.response.getValue().elapsedMilis;
      ...
      }
      

      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:

      struct RemoteCommandResponse {
      StatusWith<BSONObj> data;
      Milliseconds elapsedMillis;
      }
      

      or elapsedMillis could be stored directly in the RemoteCommandCallbackData instead.

              Assignee:
              Siyuan Zhou
              Reporter:
              Adam Midvidy (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: