Skip to content

Commit 328c82b

Browse files
authored
DOCSP-33986 fsync lock after crash (#5140) (#5164)
* DOCSP-33986 fsync lock after crash * Adjusts text * Adjusts text * Fixes per Jeff * Fixes per Jeff
1 parent 4e7fb0b commit 328c82b

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
@@ -144,6 +144,34 @@ each shard and returns the results, which includes the ``lockCount`` for each.
144144
and cluster. To reduce the lock count, use the :dbcommand:`fsyncUnlock`
145145
command.
146146

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

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)