* Single write lock (per database)
* Reader-Writer lock : allowing concurrent access to multiple threads for reading but restricting access to a single thread for writes (or other changes) to the resource
(from wikipedia) In computer science, a readers-writer or shared-exclusive lock (also known as the multiple readers / single-writer lock or the multi-reader lock, or by typographical variants such as readers/writers lock) is a synchronization primitive that solves one of the readers-writers problems. A readers-writer lock is like a mutex, in that it controls access to a shared resource, allowing concurrent access to multiple threads for reading but restricting access to a single thread for writes (or other changes) to the resource. A common use might be to control access to a data structure in memory that can't be updated atomically and isn't valid (and shouldn't be read by another thread) until the update is complete.
* Yield lock
- from version 2.0 if page fault has been occured in mongod (data is not loaded to memory). It yield lock
- long running read locks will ield periodically to ensure that write operations have the opportunity to complete.
* Sharding & Locking : the lock is not shared across the shard. each shard has its own locking
* Replication & Locking
- Primary to secondary replication is done by batch way. it copies oplog to secondary and run it as a batch.
참고 : mongodb FAQ/locking
'클라우드 컴퓨팅 & NoSQL > MongoDB' 카테고리의 다른 글
|MultiThread로 RabbitMQ에서 메세지를 읽어서 MongoDB에 쓰는 예제 (Python) (1)||2014.01.03|
|mongodb locking (0)||2014.01.02|
|Python을 이용한 간단한 mongodb insert 예제 (1)||2013.05.04|
|MongoDB의 Physical 데이타 저장 구조 (3)||2013.05.03|
|MongoDB 30분만에 이해하기.. (설치,테스트 및 자바 샘플) (3)||2013.04.30|
|MongoDB vs Cassandra Performance (3)||2012.03.05|