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

Log a rollback summary

    • Fully Compatible
    • Repl 2018-03-26, Repl 2018-04-09
    • 60

      When a rollback is performed we should provide a summary statement in the mongoD log which provides:

      1. Success/failure of the rollback
      2. A clear summary of the actions performed
      3. The name and location of any rollback files written
      4. A unique tag/ID that could be used for alert purposes

      The following is an example of what we print in 3.2.0-rc4. This example is rolling back 2 documents that this member contained and the primary did not. There is a summary of the actions taken ("rollback 5 d:2 u:0") but it is not in a form most users will understand.

      data/replset/rs2/mongod.log:2015-11-30T10:19:30.578-0500 I REPL     [rsBackgroundSync] starting rollback: OplogStartMissing our last op time fetched: (term: 2, timestamp: Nov 30 10:18:47:1). source's GTE: (term: 3, timestamp: Nov 30 10:19:18:2) hashes: (605599081996457668/881505516521125255)
      data/replset/rs2/mongod.log:2015-11-30T10:19:30.579-0500 I REPL     [rsBackgroundSync] beginning rollback
      data/replset/rs2/mongod.log:2015-11-30T10:19:30.580-0500 I REPL     [rsBackgroundSync] rollback 0
      data/replset/rs2/mongod.log:2015-11-30T10:19:30.580-0500 I REPL     [ReplicationExecutor] transition to ROLLBACK
      data/replset/rs2/mongod.log:2015-11-30T10:19:30.581-0500 I REPL     [rsBackgroundSync] rollback 1
      data/replset/rs2/mongod.log:2015-11-30T10:19:30.585-0500 I REPL     [rsBackgroundSync] rollback 2 FindCommonPoint
      data/replset/rs2/mongod.log:2015-11-30T10:19:30.586-0500 I REPL     [rsBackgroundSync] rollback our last optime:   Nov 30 10:18:47:1
      data/replset/rs2/mongod.log:2015-11-30T10:19:30.586-0500 I REPL     [rsBackgroundSync] rollback their last optime: Nov 30 10:19:18:2
      data/replset/rs2/mongod.log:2015-11-30T10:19:30.587-0500 I REPL     [rsBackgroundSync] rollback diff in end of log times: -31 seconds
      data/replset/rs2/mongod.log:2015-11-30T10:19:30.587-0500 I REPL     [rsBackgroundSync] rollback 3 fixup
      data/replset/rs2/mongod.log:2015-11-30T10:19:30.589-0500 I REPL     [rsBackgroundSync] rollback 3.5
      data/replset/rs2/mongod.log:2015-11-30T10:19:30.589-0500 I REPL     [rsBackgroundSync] rollback 4 n:1
      data/replset/rs2/mongod.log:2015-11-30T10:19:30.591-0500 I REPL     [rsBackgroundSync] rollback 4.6
      data/replset/rs2/mongod.log:2015-11-30T10:19:30.591-0500 I REPL     [rsBackgroundSync] rollback 4.7
      data/replset/rs2/mongod.log:2015-11-30T10:19:30.594-0500 I REPL     [rsBackgroundSync] rollback 5 d:2 u:0
      data/replset/rs2/mongod.log:2015-11-30T10:19:30.594-0500 I REPL     [rsBackgroundSync] rollback 6
      data/replset/rs2/mongod.log:2015-11-30T10:19:30.595-0500 I REPL     [rsBackgroundSync] rollback done
      data/replset/rs2/mongod.log:2015-11-30T10:19:30.597-0500 I REPL     [rsBackgroundSync] rollback finished
      

            Assignee:
            kyle.suarez@mongodb.com Kyle Suarez
            Reporter:
            james.wahlin@mongodb.com James Wahlin
            Votes:
            0 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: