Skip to content

Commit d825c56

Browse files
authored
DOCSP-33986 fsync lock after crash (#5140) (#5167)
* DOCSP-33986 fsync lock after crash * Adjusts text * Adjusts text * Fixes per Jeff * Fixes per Jeff
1 parent b1d3a16 commit d825c56

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed

source/reference/command/fsync.txt

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,34 @@ each shard and returns the results, which includes the ``lockCount`` for each.
138138
and cluster. To reduce the lock count, use the :dbcommand:`fsyncUnlock`
139139
command.
140140

141+
Fsync Locks after Failures
142+
~~~~~~~~~~~~~~~~~~~~~~~~~~
143+
144+
Fsync locks execute on the primary in a replica set or sharded cluster.
145+
146+
If the primary goes down or becomes unreachable due to network issues, the
147+
cluster :ref:`elects <replica-set-elections>` a new primary from the available
148+
secondaries. If a primary with an fsync lock goes down, the new primary does
149+
**not** retain the fsync lock and can handle write operations. When elections
150+
occur during backup operations, the resulting backup may be inconsistent or
151+
unusable.
152+
153+
To recover from the primary going down:
154+
155+
#. Run the :dbcommand:`fsyncUnlock` command until the lock count reaches zero
156+
to release the lock on all nodes.
157+
158+
#. Issue the :dbcommand:`fsync` command to reestablish the fsync lock on the
159+
cluster.
160+
161+
#. Restart the backup.
162+
163+
164+
Additionally, fsync locks are persistent. When the old primary comes online
165+
again, you need to use the :dbcommand:`fsyncUnlock` command to release the lock
166+
on the node.
167+
168+
141169
Examples
142170
--------
143171

source/reference/method/db.fsyncLock.txt

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,37 @@ Behavior
6464

6565
.. include:: /includes/extracts/wt-fsync-lock-compatibility.rst
6666

67+
68+
Fsync Locks after Failures
69+
~~~~~~~~~~~~~~~~~~~~~~~~~~
70+
71+
Fsync locks execute on the primary in a replica set or sharded cluster.
72+
73+
74+
If the primary goes down or becomes unreachable due to network issues, the
75+
cluster :ref:`elects <replica-set-elections>` a new primary from the available
76+
secondaries. If a primary with an fsync lock goes down, the new primary does
77+
**not** retain the fsync lock and can handle write operations. When elections
78+
occur during backup operations, the resulting backup may be inconsistent or
79+
unusable.
80+
81+
To recover from the primary going down:
82+
83+
84+
#. Run the :method:`db.fsyncUnlock` method until the lock count reaches zero
85+
to release the lock on all nodes.
86+
87+
#. Issue the :method:`db.fsyncLock` command to reestablish the fsync lock on the
88+
cluster.
89+
90+
#. Restart the backup.
91+
92+
93+
Additionally, fsync locks are persistent. When the old primary comes online
94+
again, you need to run the :method:`db.fsyncUnlock` command to release the
95+
lock on the node.
96+
97+
6798
Example
6899
-------
69100

0 commit comments

Comments
 (0)