MongoDB Question: Download MongoDB PDF

Explain do I have to call getLastError to make a write durable?

Tweet Share WhatsApp

Answer:

No. If you don't call getLastError (aka "Safe Mode") the server does exactly the same behavior as if you had. The getLastError call simply lets one get 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.

Download MongoDB PDF Read All 39 MongoDB Questions
Previous QuestionNext Question
What is a secondary or slave?Tell me should I start out with sharded or with a non-sharded MongoDB environment?