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

Add operationTime to command response

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.4
    • Affects Version/s: None
    • Component/s: Sharding
    • Labels:
      None
    • Fully Compatible
    • Sharding 2017-03-06

      The goal is to put the "operationTime" filed in the command response. Therefore it will be

        operationTime: <ClusterTime for this operation> 

      The method should return just a clusterTime known to the node, the actual implementation will be done in SERVER-27786.

      1. add to commands.[h cpp]

      // adds operationTime to command bob
      void appendOperationTime(Timestamp operationTime, BSONObjBuilder* resultBob)
      

      2. add to dbcommands.[h cpp]

      // computes operationTime 
      Timestamp getOperationTime(OperationContext* txn,
                        const rpc::RequestInterface& request)
      

      3. The appendOperationTime should be called in the Command::run() with the inPlaceReplyBob as an argument.

      4. Add unit tests

            Assignee:
            misha.tyulenev@mongodb.com Misha Tyulenev
            Reporter:
            misha.tyulenev@mongodb.com Misha Tyulenev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: