Skip to main content

rollback

Function rollback 

Source
pub fn rollback(transaction_id: &str) -> Result<(), Error>
Expand description

Reverts all operations recorded in a transaction.

This is the “Atomic Rollback” mechanism. It processes operations in reverse order:

  • Installs are uninstalled.
  • Uninstalls are re-installed (either from local store or registry).
  • Upgrades are reverted to the previous version.

§Errors

Returns an error if the transaction log file cannot be read, if the content is not valid JSON, or if the rollback operation fails.