User: Ok I think we can solve this by removing pendingDbVersion, and instead replace it with the use of requested_version, and then set requested_version to dbVersion in abort
Agent: I have successfully refactored the TLA+ specification to remove pendingDbVersion and use requestedVersion instead. Here is a summary of the changes:
User: Add an oldDbVersion variable, set it from dbVersion at CreateUpgradeTransaction. Then, when aborting an upgrade, set requested_version to oldDbVersion, and also reset dbVersion
I have successfully implemented the oldDbVersion variable and the associated logic to handle database version rollbacks during upgrade aborts. I verified the changes using the SANY parser (which passed) and ran a TLC smoke test