-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Replication
-
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:
- Success/failure of the rollback
- A clear summary of the actions performed
- The name and location of any rollback files written
- 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
- depends on
-
SERVER-30501 Create rollback logging component
- Closed
- is related to
-
SERVER-29051 RollbackImpl should create rollback data files
- Closed
-
SERVER-31062 Add more detailed diagnostics for rollback via refetch (rs_rollback.cpp)
- Closed
- related to
-
SERVER-33986 Log stable checkpoint when restarting as a standalone
- Closed