Progress
Programming
Handbook
Subtransaction Mechanics
If a transaction is already active and Progress encounters a DO ON ERROR, DO TRANSACTION, FOR EACH, REPEAT, or procedure block, Progress starts a subtransaction. All database activity occurring during that subtransaction is written to a local-before-image (LBI) file. Progress maintains one LBI file for each user. If an error occurs during the subtransaction, Progress uses this local-before-image file to restore the database to the condition it was in before the subtransaction started. Progress uses the local-before-image file to back out variables and to back out subtransactions in all cases when an entire transaction is not being backed out.
Note that the first time a variable is altered within a subtransaction block, all of the variables in the procedure are written to the LBI file as a record.
Because the local-before-image information is not needed for crash recovery, it does not have to be written to disk in a carefully synchronized fashion as does the before-image information. This minimizes the overhead associated with subtransactions. The local-before-image file is written using normal, buffered I/O.
The amount of disk space required for each user’s LBI file depends on the number of subtransactions started that are subject to being undone.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |