Q. about Concurrency in manual

While looking at the manual, I found something I didn’t understand.



WiredTiger supports concurrent access by readers and writers to the documents in a collection. Clients can read documents while write operations are in progress, and multiple threads can modify different documents in a collection at the same time.

Can you explain what the meaning of the sentence is compared to RDB?

Also, I thought of a situation.
When the writer performed the operation of changing A to B, and the reader performed the operation of reading A, the reader might or might not be able to bring the result of A because writer and reader were approaching simultaneously.
And I thought we should use write concern or read concern to solve the problem.
Am I right?

Hi @Kim_Hakseon ,

So MongoDB allow concurrent access to documents while locking on a document level. So if you read value A before the lock to write B was acquired you will get value A, if value B is applied you will get value B eventually.

Now read concern and write concern are related to driver behaviour on replicated data and has only to do with read your own writes and causal consistency and nothing to do with concurrency within an instance.

What does affect concurrency is use sessions transactions and read isolation levels:


So they are said to be approached at the same time, but should I think that there is strictly an order of approach by Lock?

The concurrent access and the concurrent operate are not the same.
Because concurrent access is about connection.

I think current access means the reader and current operator means the writer.

And there is an order of approach by lock when until point a in time reader will get A and after a certain critical section of a write any reader will get b.

I made a typo of concurrent to current.
Please check the revised contents again.