Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8253421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T00:52:13+00:00 2026-06-08T00:52:13+00:00

MongoDB has a write mechanism of fire and forget . But does this guarantee

  • 0

MongoDB has a write mechanism of fire and forget. But does this guarantee that my writes will be written to disk eventually? So if i have a statement like this(in pymongo)

collection.insert(doc)     #not passing safe=True

I understand that my write in above statement will not immediately reach the disk but is there a guarantee that it would ever reach the disk(maybe the next day or a week later) or can it get lost and never come back. My application needs dont want the writes to be done synchronously but they want the writes to happen even if its hours later.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T00:52:15+00:00Added an answer on June 8, 2026 at 12:52 am

    The meaning of “fire and forget” (aka the default writes of MongoDB) is that the driver will not confirm the write with the server. Your write is placed on the network, the driver confirms it reaches the network transport but past that no other checking is performed.

    As long as the server & network is up, it is expected the write will succeed. However, this also means you won’t find out about issues such as violating a unique index.

    Writes initially occur in memory, and are flushed to disk at least every 60 seconds. If you have journalling turned on, the write will get into the journal within 100 ms – this journal can recover in case of a crash upon mongod restarting.

    If you want to verify that a write has made it to mongod and successfully been applied in memory, you should set safe=True

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a mongoDB collection named col that has documents that look like this
I have a collection of articles in MongoDB that has the following structure: {
I have a hosted web application that has MongoDB as its DB. Now, I
I am using 10Gen .net driver for MongoDB and querying objects that has empty
I installed MongoDB via Brew and now I get this error: /Library/StartupItems/MongoDB has not
MongoDB's ObjectId has a getTimestamp() method that returns time when the record was inserted.
I have a simple project that has one submodule. $ git submodule 964737623a362f6303e87ec41f2c7090c8c2c093 lib/mongodb-php-odm
today I updated my Mongo.. mongodb-stable (from 10gen repo) but my service has down.
I am building a little app that has to communicate with a MongoDB database.
MongoDB 2.2 has a write lock per database as opposed to a global write

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.