HP 3000 Manuals

Dynamic Rollback for TurboIMAGE/XL [ COMMUNICATOR 3000/XL XL RELEASE 3.0 ] MPE/iX Communicators


COMMUNICATOR 3000/XL XL RELEASE 3.0

Dynamic Rollback for TurboIMAGE/XL 

by Mark Boronkay 
Commercial Systems Division/DBL 

XL Release 3.0 includes a new feature of TurboIMAGE/XL called Dynamic
Rollback.  Dynamic Rollback allows uncommitted logical transactions to be
rolled back dynamically (online) while other database activity is
occurring.  This new feature is accomplished through the use of three new
intrinsics:  DBXBEGIN, DBXEND and DBXUNDO.

USING DYNAMIC ROLLBACK 

In order to use the new dynamic rollback feature, applications will have
to be modified to:  1) incorporate the new above mentioned intrinsics
and, 2) ensure that the appropriate DBLOCK and DBUNLOCK calls are placed
in the proper location to enforce strong locking (for more information
about strong locking, and dynamic rollback please refer to the
TurboIMAGE/XL Database Management Systems Reference Manual (P/N
30391-90001).  DBXBEGIN and DBXEND will mark the beginning and end of
logical transactions instead of the current DBBEGIN and DBEND intrinsics.
A programmatic call to DBXUNDO will abort a logical transaction by
dynamically backing out all the transactions for that process that were
started by DBXBEGIN.


NOTE The use of Dynamic Rollback is incompatible with programs such as Silhouette that are dependent on TurboIMAGE/XL log records. This is because DBXBEGIN, DBXEND, and DBXUNDO all generate new log records. These new log records are not recognized by Silhouette. It is therefore recommended that users of Silhouette or other programs dependent on TurboIMAGE/XL user log records not utilize this enhancement.
The following example illustrates the use of these new intrinsics in an interactive environment: DBLOCK (X,Y) << Call DBLOCK. We will attempt to do a DBPUT to two different detail datasets X and Y. This will define our logical transaction. >> DBXBEGIN << Mark this as the beginning of our logical transaction. >> DBPUT (X) << DBPUT to dataset X. >> If DBPUT (X) <> << If the DBPUT fails, call DBXUNDO to clean up the DBXUNDO control blocks and 'undo' any writes that may have GOTO error'exit already been completed to the XM log file. >> DBPUT (Y) << DBPUT to dataset Y. >> If DBPUT (Y) <> 0 << If the DBPUT fails, call DBXUNDO to clean up the DBXUNDO control blocks and 'undo' the previous DBPUT to GOTO error'exit set X as well as any XM writes that may have already been completed. > DBXEND << Mark this as the end of the logical transaction. >> DBUNLOCK << DBUNLOCK must be placed after the DBXEND to enforce strong locking. >> Another effect is when the application aborts or a system failure occurs within a DBXBEGIN/DBXEND transaction. In the case of an application abort, those transactions begun after a DBXBEGIN, which do not have a corresponding DBXEND, will be automatically rolled out. The same holds true for system failures. That is,any transactions begun after a DBXBEGIN that do not have a corresponding DBXEND, will also be automatically rolled out. Note that this feature is available for TurboIMAGE/XL only and that once an application takes advantage of dynamic rollback, it can no longer be source compatible with its TurboIMAGE/V counterpart. Likewise, the same goes for the log files produced by TurboIMAGE/XL. That is, the three new intrinsics will write entries to the user log file that cannot be interpreted by the TurboIMAGE/V DBRECOV.


MPE/iX Communicators