Description of problem: Example of scenario - During preview of snapshots , the code creates a new active snapshot. Compensation table will contain indication a new entity was added. If engine crashes, compensation logic removes the added entity, and at the endSuccessfuly method, there is usage of the added snapshot- but it does not exist - NPE occurs. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Suggested patch upstream http://gerrit.ovirt.org/#/c/9122/
After discussing the issue in depth with Liron, it looks like we are better off without this fix. Today the command mechanism relies on the compensation to be reverted on engine restart as a way to understand that not all subcommands were actually executed, hence each parent command need to validate all the new entities it had created still exist in the DB (and not reverted ...) on endSuccessfully. So today we are better off without this fix, as it will often falsely assume that the parent command succeeded (not reverted) even if some of it's sub commands did not even start.