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

Replica set initialization writes first oplog entry with no term

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Replication
    • Labels:
      None
    • Replication
    • ALL

      When a replica set is first initialized using rs.initiate(), it writes a note to that effect into the oplog as its first entry. However, this is written while the term is OpTime::kUninitializedTerm, and the entry therefore has no term field t:

      { "op" : "n", "ns" : "", "o" : { "msg" : "initiating set" }, "ts" : Timestamp(1563285225, 1), "v" : NumberLong(2), "wall" : ISODate("2019-07-16T13:53:45.914Z") }
      

      This has been the case since 3.6 and remains so on current master.

            Assignee:
            backlog-server-repl [DO NOT USE] Backlog - Replication Team
            Reporter:
            bernard.gorman@mongodb.com Bernard Gorman
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated: