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

Write Commands should return replication information (writtenTo)

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Replication, Sharding, Write Ops
    • None
    • Sharding

      Much like getLastError (SERVER-4073) the write commands should return back information about the write, even if there is no error.

      This information could be made optional based on a flag for the write command like:

      > runCommand({write-command:"ns", args:{}, replicationStats:true});
      {
      	"ok" : 1,
      	"n" : 1,
              "replication" : { "writtenTo": {...}, 
                                      "lastOp" : Timestamp(1410874677, 2),        
                                      "electionId" : ObjectId("54183d104e7e3b1d24ab296a")}
      }
      

      Note: lastOp and electionId are already returned in the response at the top.

            Assignee:
            backlog-server-sharding [DO NOT USE] Backlog - Sharding Team
            Reporter:
            scotthernandez Scott Hernandez (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: