Skip to content

Commit 2ebed16

Browse files
authored
DOCSP-14267- isLagged Update (#407)
* DOCSP-14267 transfers text with expansion from old ticket * DOCSP-14267 transfers text with expansion from old ticket * DOCS-14267 Updates text per internal feedback * DOCS-14267 refactors explanation, per feedback * DOCSP-14267 Updates per feedback * DOCSP-14267 Updates to example explanation * DOCSP-14267 vale cleanup * DOCSP-14267 Fixes from Jason feedback * DOCSP-14267 Fixes from Jason feedback * DOCSP-14267 updates from Jason feedback * DOCSP-14267 Fixes from Jason feedback * DOCSP-14267 Fixes from Jason feedback * DOCSP-14267 Fixes from Jason feedback * DOCSP-14267 Fixes from Jason feedback * DOCSP-14267 refactor to include troubleshooting content * DOCSP-14267 Fixes from Jason feedback * DOCSP-14267 Fixes from Jason feedback * DOCSP-14267 Fixes from Jason feedback * DOCSP-14267 Fixes from Jason feedback * DOCSP-14267 Fixes from Jason feedback * DOCSP-14267 Fixes per Gregory Noma feedback
1 parent dd8f53c commit 2ebed16

File tree

2 files changed

+56
-1
lines changed

2 files changed

+56
-1
lines changed

source/reference/command/serverStatus.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,12 @@ flowControl
874874
committed lag is greater than some percentage of the configured
875875
:parameter:`flowControlTargetLagSeconds`.
876876

877-
When run on a secondary, the returned boolean is a placeholder.
877+
Replication lag can occur without engaging flow control.
878+
An unresponsive :term:`secondary` might lag without the replica set
879+
receiving sufficient load to engage flow control, leaving
880+
the :serverstatus:`flowControl.isLagged` value at ``false``.
881+
882+
For additional information, see :ref:`Flow Control <flow-control>`.
878883

879884
.. versionadded:: 4.2
880885

source/tutorial/troubleshoot-replica-sets.txt

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,56 @@ Flow Control
143143

144144
.. include:: /includes/extracts/4.2-changes-flow-control-specific-desc.rst
145145

146+
Replication lag can occur without the replica set receiving sufficient load
147+
to engage flow control, such as in the case of an unresponsive
148+
:term:`secondary`.
149+
150+
To view the status of flow control, run the following commands on the
151+
:term:`primary`:
152+
153+
#. Run the :method:`rs.printSecondaryReplicationInfo` method to determine if
154+
any nodes are lagging:
155+
156+
.. code-block:: javascript
157+
158+
rs.printSecondaryReplicationInfo()
159+
160+
Example output:
161+
162+
.. code-block:: javascript
163+
:copyable: false
164+
165+
source: 192.0.2.2:27017
166+
{
167+
syncedTo: 'Mon Jan 31 2022 18:58:50 GMT+0000 (Coordinated Universal Time)',
168+
replLag: '0 secs (0 hrs) behind the primary '
169+
}
170+
---
171+
source: 192.0.2.3:27017
172+
{
173+
syncedTo: 'Mon Jan 31 2022 18:58:05 GMT+0000 (Coordinated Universal Time)',
174+
replLag: '45 secs (0 hrs) behind the primary '
175+
}
176+
177+
#. Run the :dbcommand:`serverStatus` command and use the
178+
:serverstatus:`flowControl.isLagged` value to determine whether the
179+
replica set has engaged flow control:
180+
181+
.. code-block:: javascript
182+
183+
db.runCommand( { serverStatus: 1 } ).flowControl.isLagged
184+
185+
Example output:
186+
187+
.. code-block:: javascript
188+
:copyable: false
189+
190+
false
191+
192+
If flow control has not engaged, investigate the :term:`secondary`
193+
to determine the cause of the replication lag, such as limitations in
194+
the hardware, network, or application.
195+
146196
For information on flow control statistics, see:
147197

148198
- :serverstatus:`flowControl <flowControl>`

0 commit comments

Comments
 (0)