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

Only use elapsedMillis when command succeeds

    • Fully Compatible
    • ALL

      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@mongodb.com Siyuan Zhou
            Reporter:
            adam.midvidy Adam Midvidy
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: