From: Saeed Mahameed <sae...@dev.mellanox.co.il>
Date: Tue, 26 Apr 2016 23:55:03 +0300

> It will be a nightmare to rollback in such case.  What if the rollback failed 
> ?

It is absolutely essential to handle this properly.

Which means you must have a prepare/commit model, wherein the prepare
phase makes sure to pre-allocate all necessary resources, and only if
all the prepare phase preparations succeed will the commit phase run.

The commit phase cannot error, because all of the resources have been
allocated successfully already.

This way there are no issues of "rolling back" because you never
actually move the state forward until you can guarantee that you can
do everything.

Reply via email to