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 6243007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T12:03:28+00:00 2026-05-24T12:03:28+00:00

I started to use MongoDB at work so far so good. I was wondering

  • 0

I started to use MongoDB at work so far so good.
I was wondering though how does MongoDB deal with concurrent updates ?
I’ve read that there is no locking feature in MongoDB so I was wondering what is the the common practice to deal with this.

Thanks.

  • 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-05-24T12:03:29+00:00Added an answer on May 24, 2026 at 12:03 pm

    MongoDB used a process wide write lock to guarantee that only one write operation (update/insert/remove) can be performed at a time. As such it automatically solves concurrency issues since write concurrency simply isn’t allowed.

    If 4 threads attempt an update operation one of them will take the write lock, do its update and release the lock. After that one of the remaining 3 will grab the lock, do its update, etc.

    Concurrency only comes into play if your operation cannot be wrapped in a single write operation. Note that for the most common usecase (find a doc, update it and grab the new version atomically) MongoDB offers the “findAndModify” command which does just that : http://www.mongodb.org/display/DOCS/findAndModify+Command

    UPDATE : Locking is more granular these days.

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

Sidebar

Related Questions

We started to use MongoDB at work. So far so good however I was
I have started to use the simplexml function that seems to work out better
I just started to use VS 2008 Express. I noticed that I cannot add
I've just started working with mongodb got a perl script that parses a twitter
I started to use the database projects that are in Visual Studio to start
I started to use Dashcode with a Safari Custom Project, my apps work fine,
We've just started to use TeamCity as a continuous integration server. There's a problem
I started to use Jackrabbit in my project. As i found out there is
I am just getting started with MongoDB and trying to understand how indexes work.
I started to use this extension that I found on the web: public static

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.