Delete operations fail during orchestration
This needs some investigation but I believe that if a delete operation fails then the database transaction COMMITS. This appears to be because the Orchestration#destroy method is not within a transaction and the ROLLBACK is just an ordinary exception.
It may be that this is more or less complicated than that but this what I have seen.
I admit that I cannot see how this is possible, so maybe I am wrong.
#1 Updated by Paul Kelly about 8 years ago
After some investigation it appears that the structure of the code is such that the destroy teardown is occurring AFTER the commit has been executed. The obvious solution is to perform the rollback operations in an after_delete method as this ensures that we are within the transactional block.