0 votes
in MongoDB by

Is it required to call ‘getLastError’ to make a write durable?

1 Answer

0 votes
by

Is it required to call ‘getLastError’ to make a write durable?

No. If ‘getLastError’ (aka ‘Safe Mode’) is not called, the server does exactly behave the way as if it has been called. The ‘getLastError’ call simply allows one to get a confirmation that the write operation was successfully committed. Of course, often you will want that confirmation, but the safety of the write and its durability is independent.

Related questions

0 votes
asked Sep 7, 2022 in Python by sharadyadav1986
0 votes
asked Jun 28, 2020 in Python by Robindeniel
...