Given a collection containing documents of the following format:
{
name:String,
members: [ { name:String, type: String } ]
}
Let's say I have a mongodb bulk operation, containing two operations:
- A) for a list of given documents, remove all members with type 'x'
- B) for that same list of given documents, add a set of members with type 'x'
The question is: will mongodb lock the documents in question between A and B? So that no modification to 'members' of the targeted documents can take place by other processes between A and B?