mongodb - mongo write lock behavior -


i have question on mongo locks. have perform write operation on table(insert/ delete/ update). when read link locking in mongodb. says "locks “writer greedy,” , when write lock exists, single write operation holds lock exclusively, , no other read or write operations may share lock.

my question -- lock memory block based or have single lock on entire db. thinking concurrently run 2 scripts scanning 2 memory blocks of mongodb (planning scan 2 million documents in 1 query) , perform write operation side side thereby increasing performance , saving time.

i searched on net didnt find satisfactory.

any appreciated

the write lock has nothing memory, mongodb not in-memory database, os merely caches working set of mongod process ram. mongodb has no memory hooks in program.

the write lock on database level such plan not feasible.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -