How MongoDB operate global write locking?

31 views
Skip to first unread message

Nites Bootkhot

unread,
Sep 8, 2012, 9:14:48 AM9/8/12
to mongod...@googlegroups.com
Hi all,
I find out about how MongoDB operate global write lock but not found.
Anyone know about it?

On writing, if MongoDB don't found data in memory, it follow steps below.

1. find Data in storage
2. take the data to memory
3. write data in memory
4. write data to storage

What step that global write lock happen?
1 - 4 ?
3 - 4 ?
Or just 3 ?


Thank you.



Sam Millman

unread,
Sep 8, 2012, 10:05:46 AM9/8/12
to mongod...@googlegroups.com
I believe mongo has a db level lock now in 2.2.





--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com
To unsubscribe from this group, send email to
mongodb-user...@googlegroups.com
See also the IRC channel -- freenode.net#mongodb

Max Schireson

unread,
Sep 8, 2012, 1:32:31 PM9/8/12
to mongod...@googlegroups.com

Over the last 2 production releases, we've been working to get it to yield when it has to do i/o so that it only holds the lock during in-memory updates. That's generally the case now with 2.2; also as Sam points out it is now db level.

-- Max

Nites Bootkhot

unread,
Sep 9, 2012, 12:31:23 AM9/9/12
to mongod...@googlegroups.com
As your reply, MongoDB doesn't hold locking during lookup data in harddisk.  So it's short time locking.
Thank you.
--
Nites Bootkhot
Software Engineer
Intelligent Millionaire
Reply all
Reply to author
Forward
0 new messages