Scalable Database Server, HiRDB Version 8 Description
The process of placing into effect in the database the updates made by a transaction is called commit. The process of invalidating the updates made by a transaction is called rollback. When commit and rollback occur is determined as follows:
Each of these types of commit and rollback timing is explained as follows.
This section explains commit timing.
This section explains rollback timing.
A HiRDB/Parallel Server provides the following two methods of commitment control:
With one-phase commit, only commit processing is performed, rather than both prepare processing and commit processing (which is the case with two-phase commitment control). This means that the number of communication transactions for synchronization point processing between the front-end server and the back-end server (dictionary server) is the number of branches 2 (whereas, with two-phase commit, it is the number of branches 4), which improves transaction processing performance. To use one-phase commit, specify ONEPHASE (default) in the pd_trn_commit_optimize operand.
One-phase commit is used only when one branch within a single transaction is being updated. Otherwise, two-phase commit must be used.
Figure 6-22 shows the processing for one-phase commit.
Figure 6-22 Processing for one-phase commit
The process of executing one-phase commit for commitment control is called one-phase optimization.
Two-phase commit performs synchronization point processing of the transaction by separating commitment control into two phases, prepare processing and commit processing. The number of communication transactions for synchronization point processing between the front-end server and the back-end server (dictionary server) is the number of branches 4. Figure 6-23 shows the processing for two-phase commit.
Figure 6-23 Processing for two-phase commit
The type of commitment control used on a HiRDB/Parallel Server is determined by the issuer of the commit and the execution environment of the transaction. Table 6-11 shows how commitment control is determined on a HiRDB/Parallel Server.
Table 6-11 Commitment control on a HiRDB/Parallel Server
Condition | HiRDB commitment control | ||
---|---|---|---|
Issuer of the commit | Commitment control indicated by the commit issuer | Execution environment of the transaction | |
UAP | For a reference transaction | One-phase commit | |
If one server is updated by the transaction and ONEPHASE is specified (or nothing is specified) in the pd_trn_commit_optimize operand | |||
Other than the above | Two-phase commit | ||
OLTP system | One-phase commit | For a reference transaction | One-phase commit |
If one server is updated by the transaction and ONEPHASE is specified (or nothing is specified) in the pd_trn_commit_optimize operand | |||
Other than the above | Two-phase commit | ||
Two-phase commit | For a reference transactions | One-phase commit | |
Other than the above | Two-phase commit |
: Not applicable
All Rights Reserved. Copyright (C) 2007, Hitachi, Ltd.