So, a little intro to my document schema.
My document consists of multiple properties, and one of them is an array of objects (let us call it prop1).
prop1 is being maintained by RabbitMQ system in a way that single message can add new objects to prop1, update existing objects, and even delete ones that are marked for deletion.
So, the way I made that happen is by using BulkWrite method, with IsOrdered=false option.
When a message is received, I parse it, and build a list of create, update and delete statements.
And then it is being executed. I would like to point out that all of that is happening on a single document.
What I am concerned about is is this usage of BulkWrite atomic? Should I wrap it in a transaction?
*NOTE:
I know that operations on a single document are ACID guaranteed, but I am in doubt because of BulkWrite, and the statement that states that BulkWrite may leave some operations undone in case of an error. I want to make sure that BulkWrite statements are executed in a All Or Nothing way).
Regards,
Marko Saravanja