I know that MongoDB uses IX, IS, X, S level locks.
Updating the document uses IX locks at the collection level.
Since version 4.2, pipeline aggregation can be used for updates.
When doing a single document update (like using _id in the filter), does mongodb use IX lock at the collection level even if using the aggregation pipeline, not X lock at the collection level?
If used, can it be guaranteed that the update can happen atomically even if it goes through each $set stage?
(For example, while going through two $set stages, does another update request that modifies the same document wait in a pending state, or can it update between each $set stages?)