@@ -4053,7 +4053,8 @@ metrics
4053
4053
"num" : <NumberLong>
4054
4054
}
4055
4055
},
4056
- "stepDown" : {
4056
+ "stateTransition" : {
4057
+ "lastStateTransition" : <string>,
4057
4058
"userOperationsKilled" : <NumberLong>,
4058
4059
"userOperationsRunning" : <NumberLong>
4059
4060
},
@@ -4565,26 +4566,50 @@ metrics
4565
4566
Replica set members in the :replstate:`STARTUP2` state do not send
4566
4567
the ``replSetUpdatePosition`` command to their sync source.
4567
4568
4568
- .. serverstatus:: metrics.repl.stepDown
4569
+ .. serverstatus:: metrics.repl.stateTransition
4569
4570
4570
- Information on user operations that were running when the
4571
- :binary:`~bin.mongod` stepped down.
4571
+ Information on user operations when the member undergoes one of the
4572
+ following transitions that can stop user operations:
4572
4573
4573
- .. versionadded:: 4.2
4574
+ - The member steps up to become a primary.
4574
4575
4575
- .. serverstatus:: metrics.repl.stepDown.userOperationsKilled
4576
+ - The member is actively performing a rollback.
4576
4577
4577
- The number of user operations killed when the :binary:`~bin.mongod`
4578
- stepped down.
4578
+ .. serverstatus:: metrics.repl.stateTransition.lastStateTransition
4579
+
4580
+ The transition being reported:
4581
+
4582
+ .. list-table::
4583
+ :widths: 20 80
4584
+ :header-rows: 1
4585
+
4586
+ * - State Change
4587
+ - Description
4579
4588
4580
- .. versionadded:: 4.2
4589
+ * - ``"stepUp"``
4581
4590
4582
- .. serverstatus:: metrics.repl.stepDown.userOperationsRunning
4591
+ - The member steps up to become a primary.
4583
4592
4584
- The number of user operations that remained running when the
4585
- :binary:`~bin.mongod` stepped down.
4593
+ * - ``"stepDown"``
4594
+ - The member steps down to become a secondary .
4586
4595
4587
- .. versionadded:: 4.2
4596
+ * - ``"rollback"``
4597
+
4598
+ - The member is actively performing a rollback.
4599
+
4600
+ * - ``""``
4601
+
4602
+ - The member has not undergone any state changes.
4603
+
4604
+ .. serverstatus:: metrics.repl.stateTransaction.userOperationsKilled
4605
+
4606
+ The number of user operations stopped during the
4607
+ :binary:`~bin.mongod` instance's state change.
4608
+
4609
+ .. serverstatus:: metrics.repl.stateTransaction.userOperationsRunning
4610
+
4611
+ The number of user operations that remained running during the
4612
+ ``mongod`` instance's state change.
4588
4613
4589
4614
.. serverstatus:: metrics.repl.syncSource
4590
4615
0 commit comments