MarkNodeAsDeleted action recursively delete the content of the node from top to bottom. Before deleting the content a version of the node is created so to be able to restore in a latter change.
However this process is done with very little isolation, each node being deleted is then persisted one by one. This means that operation on nodes could still be performed during the deletion.
Worst, given that the nodes are marked as deleted one after the other, the recursive restore of the nodes can be launched before the entire recursive delete process is over. This in turn could overtake the delete process and , causing permanent data loss.
In order to avoid data loss, delete operation should block any changes on the node structure during the delete operation.