HP 3000 Manuals

Super Transactions [ Silhouette Reference Manual ] MPE/iX 5.0 Documentation


Silhouette Reference Manual

Super Transactions 

Silhouette handles super transactions exactly as it handles ordinary
database transactions.  A super transaction is a logically connected
series of transactions spanning multiple databases or multiple database
paths.  A typical super transaction consists of multiple DBBEGIN/DBEND
pairs each of which can contain multiple calls to TurboIMAGE routines.

Creating a Super Transaction 

To create a super transaction, the user process identifies the records in
the logfile which form the transaction.  Each DBBEGIN of the super
transaction must be called with a ten-byte unique text identifier flanked
by double asterisks.  The identifier must have the form:

     **..........**

The dots are replaced with a unique sequence of characters.

Figure 2-6 shows a sample of logfile records which includes a super
transaction.
____________________________________________________________________
|                                                                  |
|     Log record  Contents                                         |
|                                                                  |
|                  .                                               |
|                  .                                               |
|      1         ADD1                                              |
|      2         DBBEGIN2 **STRANS1   **                           |
|      3         ADD2                                              |
|      4         DBBEGIN3 **STRANS1   **                           |
|      5         ADD3                                              |
|      6         DEL1                                              |
|      7         DEL3                                              |
|      8         DBEND3   (This END matches the BEGIN in record 4.)|
|      9         DEL2                                              |
|     10         UPDATE1                                           |
|     11         UPDATE2                                           |
|     12         DBEND2   (This END matches the BEGIN in record 2.)|
|     13         DEL1                                              |
|                  .                                               |
|                  .                                               |
____________________________________________________________________

          Figure 2-6.  Super Transaction Log File Record 

The super transaction consists of the log records 2-5, 7-9, 11 and 12.
Records 1, 6, 10 and 13 are not part of the super transaction because
they are not part of a DBBEGIN/DBEND pair containing the unique super
transaction identifier.

>SWITCH With Super Transactions 

If the primary system fails before record 12 is added to the logfile, the
>SWITCH command performs its normal function of removing incomplete
transactions from the database and removes all individual transactions
which form part of the super transaction.  Records 2-5, 7-9, 11 and 12
are removed.  Records 1, 6, 10 and 13 are not removed since they do not
leave the database in an inconsistent state.  The listing produced by the
>SWITCH command includes super transactions.  When the last complete
transaction performed by a user is a super transaction, the listing shows
the entire contents of that transaction since Silhouette considers it to
be one logical modification of the database.  If the super transaction is
incomplete, the >SWITCH command listing shows all parts which have been
removed from the database.

The sample super transaction shown in Figure 2-6 would appear in the
>SWITCH listing as:

     **BEGIN
     **ADD
     01BEGIN
     01ADD
     01DEL
     01END
     **DEL
     **UPDATE
     **END

Incomplete super transactions are reported in the same way.  However, the
last **END record, and possibly other individual parts of the whole
transaction, will be missing.

Figure 2-7 shows the report generated showing completed super
transactions.  Figure 2-8 shows the report generated showing incomplete
super transactions.
_____________________________________________________________________________
|                                                                           |
|     ===================================================================== |
|                                                                           |
|     List of successfully completed Silhouette Data Base Transactions      |
|                                                                           |
|     ---User---        ---Program---       ---Data Base---   -Log#- -Ldev- |
|                                                                           |
|     MGR.ACT,ACCTS     DRIVER1.ACCTS.ACT   DBTST1.ACCTS.ACT    3373  3     |
|                                                                           |
|     **BEGIN-- **i00000000P**                                              |
|     **PUT---- MODE: 1   M-PRODUCT(Master M)  i110Product i110    M1   ..  |
|     **PUT---- MODE: 1   M-PRODUCT(Master M)  i111Product i111    M1   ..  |
|     01begin-- **i00000000P**                                              |
|     01PUT---- MODE: 1   M-PRODUCT(Master M)  i110Product i110    M1   ..  |
|     01PUT---- MODE: 1   M-PRODUCT(Master M)  i111Product i111    M1   ..  |
|     01end----                                                             |
|     02begin-- **i00000000P**                                              |
|     02PUT---- MODE: 1   M-PRODUCT(Master M)  i110Product i110    M1   ..  |
|     02PUT---- MODE: 1   M-PRODUCT(Master M)  i111Product i111    M1   ..  |
|     02end----                                                             |
|     **END----                                                             |
|     ======================================================================|
_____________________________________________________________________________

          Figure 2-7.  Report of Completed Super Transactions 
_____________________________________________________________________________
|                                                                           |
|     ================================================================      |
|                                                                           |
|     List of * incomplete * ACCTS Data Base transactions                   |
|                                                                           |
|     ---User---        ---Program---       ---Data Base---   -Log#- -Ldev- |
|     MGR.ACT,ACCTS     DRIVER1.ACCTS.ACT                                   |
|     DBTST1.ACCTS.ACT    3373  3                                           |
|                                                                           |
|     **BEGIN-- **k0000000U1**                                              |
|     **BEGIN-- **k0000000U1**                                              |
|     01begin-- **k0000000U1**                                              |
|     02begin-- **k0000000U1**                                              |
|     **UPDATE- MODE: 1   M-PRODUCT(Master M)                               |
|     01update- MODE: 1   M-PRODUCT(Master M)                               |
|     01end----                                                             |
|     02update- MODE: 1   M-PRODUCT(Master M)                               |
|     02end----                                                             |
|                                                                           |
|     ======================================================================|
_____________________________________________________________________________

          Figure 2-8.  Report of Incomplete Super Transactions 



MPE/iX 5.0 Documentation