Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-7787

isMaster lastWrite field

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 3.4.0
    • None
    • manual
    • 0.5

    Description

      When run on a replicaset, the isMaster command now returns a new top level field called "lastWrite". lastWrite contains the "opTime" and "lastWriteDate" which is the optime and date of the last applied write on that server. If --enableMajorityReadConcern is specified, "majorityOpTime" and "majorityWriteDate" will also appear. They return the optime and date of the last committed snapshot, which is the latest optime and date of the writes that would be returned if a readConcern majority read were issued against that server.

      "lastWrite" : {
      		"opTime" : {
      			"ts" : Timestamp(1462197355, 1),
      			"t" : NumberLong(1)
      		},
      		"lastWriteDate" : ISODate("2016-05-02T13:55:55Z"),
      		"majorityOpTime" : {
      			"ts" : Timestamp(1462197355, 1),
      			"t" : NumberLong(1)
      		},
      		"majorityWriteDate" : ISODate("2016-05-02T13:55:55Z")
      	},
      

      Attachments

        Activity

          People

            andrew.aldridge@mongodb.com Andrew Aldridge
            judah.schvimer@mongodb.com Judah Schvimer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              7 years, 9 weeks, 1 day ago