How to update operations immediately sync to disk in mongodb?



How to update operations immediately sync to disk in mongodb?..

Answer / Bhuwanesh Garbyal

By default, MongoDB uses a write concern of journaling (w:1), which ensures that all updates are written to the journal on disk before the acknowledgement is sent back to the client. To force immediate synchronization to disk for every operation, you can set the write concern to 'journaled' or 'majority', as both ensure a majority vote from replica sets.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More MongoDB Interview Questions

What is mongodb and why we use?

1 Answers  


Is mongodb a language?

1 Answers  


Does mongodb use javascript?

1 Answers  


How do I do transactions/locking in mongodb?

1 Answers  


Who uses mongodb?

1 Answers  


What are types of data models in mongodb?

1 Answers  


Why is mongodb so fast?

1 Answers  


When an object attribute is removed, is it deleted from the store?

1 Answers  


Is mongodb better than cassandra?

1 Answers  


What is the use of a namespace in mongodb?

1 Answers  


How you can inspect the source code of a function?

1 Answers  


While creating schema in mongodb what are the points need to be taken in consideration?

1 Answers  


Categories