Locking multi collection in Mongodb

Hi Team, We want to provide read and write lock on multi collections(more than 1 collection to be locked until db operation is completed) based on one field . for example we are updating CollectionA.fieldA at the same time we want to lock the document for fieldA in CollectionB so that until the operation in CollectionA is completed, user should not be able to operate query/insert/update/delete operations on CollectionB for the same document(fieldA).

I tried findOneAndUpdate() , but this works on a single document of one collection.

I also tried ACID operations for external commit, but locking is not happening for more than 1 collection and it is ending in auto commit for collection where we are trying to update, we don’t have any explicit control to include other collection into this locking scope.

Please let us know how to achieve this functionality.