Mongodb transaction if document has multiple copies

34 views Asked by At

Consider I have a document A in the MongoDB database with multiple copies (as it is a distributed db, partition P1 and P2 has same entry A)

Given there is single document transaction in Mongo, if I update A to A1 , can I be ensured that both the partitions P1 and P2 has same copy of data A as A1 at the same time. So if I query for A1, I will be getting the same value from both the partitions ?

If not, what am I not understanding correctly for Mongodb ?

I was going through https://www.mongodb.com/docs/manual/core/transactions/ and system designing and faced the question.

0

There are 0 answers