How does WiredTiger handle Document Level Concurrency for bulkWrite, especically for update and delete operation

  • I have a big table which have frequent add/update/delete operations. When I use transaction with bulkWrite to apply multiple operations at once or rollback to nothing, does this bulkWrite operation lock entire table or it will lock only documents which it will be modifying? According to the docs, WiredTiger does support document level concurrency, but I cannot confirm this use case.
  • In my use case, there will be multiple processes running bulkWrite for different set of documents. It is guarantee that all these processes will not modify the same set of docuements. Therefore, it is best to NOT lock the entire collection when doing so. The reason for transaction is to make sure it will rollback when one operation fails.
  • Any insight for this behaviour is appriciated, thanks