When a user installs the hotfix from hotfix manager, we import the instances present in the hotfix in hotfix mode. These new instances are saved to the database and we keep the backup of old instances and hotfix is marked as uncommitted. Please note that the hotfix changes are already committed to the database. If the hotfix is working fine , user can move the hotfix to committed state.
Once the user pushes the hotfix in commit state , there is no option to roll back the changes.
Also during this testing, if the hotfix has some issues, there is an option to rollback all the uncommitted hotfixes. During rollback , instances present in hotfixes are removed from the system and database is restored back to its previous state from copy of old instances.
Thanks Lochana. In summary, the rollback mechanism is handled by restoring the DB backup of the instance which was taken before the time of the Hotfix installation. In between the installation and testing of hotfix, if there are changes done to the rulebase or data then after restoration (if testing fails) those will be lost.