Nonstop Database, HiRDB Version 9 System Operation Guide

[Contents][Index][Back][Next]

26.9.8 Transaction queuing facility

You can use the transaction queuing facility while using the standby-less system switchover facility.

Organization of this subsection
(1) About the transaction queuing facility
(2) Setting up the environment
(3) Transactions that are subject to queuing
(4) Notes

(1) About the transaction queuing facility

When a system switchover occurs in a unit for a back-end server or dictionary server, the back-end server or dictionary server cannot accept any transactions until the system switchover is complete. This means that any transaction to be processed by the back-end server or dictionary server while the system switchover is in progress results in an error.

The function called the transactions queuing facility queues transactions on the front-end server until an ongoing system switchover is complete, without causing errors for these transactions. This makes it possible to reduce the number of transaction errors occurring during a system switchover. The following figure provides an overview of the transaction queuing facility.

Figure 26-119 Overview of the transaction queuing facility

[Figure]

#
The standby-less system switchover facility works as follows:
  • During normal operation, the normal unit becomes the running system and the alternate portion becomes the standby system.
  • During alternating operation, the alternate portion becomes the running system and the normal unit becomes the standby system.

Explanation
An error occurred in the unit for a back-end server and a system switchover was performed. Transactions are queued until the standby system unit is activated, and then transaction processing resumes.

Remarks
  • Transactions for execution by a unit that was not switched (did not cause an error) are not queued. These transactions are executed as usual.
  • Using multiple front-end servers makes it possible to reduce transaction errors when a system switchover occurs for units for front-end servers. In such a setup, only the transaction in progress when an error occurs results in an error.

(2) Setting up the environment

To use the transaction queuing facility, specify the operands listed in the following table.

Table 26-78 Operands to specify in order to use the transaction queuing facility

Operand Description
pd_ha_agent Specify this operand if you are using the rapid system switchover facility, the standby-less system switchover (1:1) facility, or the standby-less system switchover (effects distributed) facility.
standbyunit: Uses the rapid system switchover facility.
server: Uses the standby-less system switchover (1:1) facility.
activeunits: Uses the standby-less system switchover (effects distributed) facility.
pd_ha_transaction Specifies that the transaction queuing facility is to be used.
When NO is specified in the PDHATRNQUEUING operand in the client environment definition, the UAP executed by the HiRDB client is not subject to the transaction queuing facility. For details about the PDHATRNQUEUING operand, see the HiRDB Version 9 UAP Development Guide.
pd_ha_trn_queuing_wait_time Specifies the queuing wait time for transactions. If the standby system unit is not activated before the wait time specified in this operand expires, transactions currently being queued result in an error. Any subsequent transactions result in an error and are not queued.
pd_ha_trn_restart_retry_time If a system switchover occurs while the transaction queuing facility is being used, transactions are queued on the front-end server. However, the front-end server cannot detect the system switchover until the standby system unit restarts. During the time from when the system switchover occurs until the time the standby system unit restarts, the front-end server continues to request that the running system unit start transactions. However, such transaction startup requests result in errors because the running system unit has already terminated abnormally. The front-end server retries the transaction startup requests repeatedly.
A maximum retry time value is specified in this operand. If the standby system unit has not restarted by the time the value specified in this operand is reached, transactions currently being retried result in an error. All subsequent transactions result in an error also and are not retried.
Figure 26-120 Relationship between the pd_ha_trn_queuing_wait_time operand and the pd_ha_trn_restart_retry_time operand shows the relationship between the pd_ha_trn_queuing_wait_time operand and the pd_ha_trn_restart_retry_time operand.

Figure 26-120 Relationship between the pd_ha_trn_queuing_wait_time operand and the pd_ha_trn_restart_retry_time operand

[Figure]

#
The standby-less system switchover facility works as follows:
  • During normal operation, the normal unit becomes the running system and the alternate portion becomes the standby system.
  • During alternating operation, the alternate portion becomes the running system and the normal unit becomes the standby system.

Explanation
Intervals A and D:
Transactions can start (normal status).
Interval B:
The back-end server unit is performing a system switchover, but the front-end server cannot detect that a system switchover is in progress. A transaction startup request is retried until the amount of time specified in the pd_ha_trn_restart_retry_time operand is reached. When the front-end server detects the system switchover, the transaction is queued. If the system switchover is not detected before the specified amount of time is reached, the transaction results in an error.
Interval C:
The back-end server unit is performing a system switchover, but the front-end server cannot detect that a system switchover is in progress. The transaction is queued until the amount of time specified in the pd_ha_trn_queuing_wait_time operand is reached. If the transaction cannot be started before this amount of time is reached, the transaction results in an error.

(3) Transactions that are subject to queuing

Transactions generated by an SQL extension are subject to queuing. However, transactions generated by definition SQL and transactions using the holdable cursor facility are not subject to queuing. The following transactions are not subject to queuing:

However, depending on the timing, some of these transactions might be queued.

(4) Notes

(a) Interval monitoring operands

The transaction queuing time is the maximum value that is equal to the sum of the value of the pd_ha_trn_queuing_wait_time operand (default: 180 seconds) and the value of the pd_ha_trn_restart_retry_time operand (default: 60 seconds). Therefore, take careful note of the values for the following operands:

The time required to perform a system switchover is determined by calculating the difference between the time the cluster software outputs the system switchover startup message to the syslogfile and the time it outputs the system switchover completion message to the syslogfile. One of the following messages is output when a system switchover starts:

The KAMN311-I message is output when a system switchover is complete.

(b) Notes on using lists

Exercise caution if a system switchover occurs while a search that uses a list is underway. A list created by a unit before a system switchover occurs is deleted when a system switchover occurs on a back-end server or a dictionary server. Therefore, a search that uses a list (queued transactions) will result in an error after a system switchover occurs. If this happens, either delete or re-create the list.

(c) Maximum number of concurrent connections (value of the pd_max_users operand)

Because a larger number of users than usual are waiting to perform processing while transactions are being queued, the maximum number of concurrent connections (value of the pd_max_users operand) might be exceeded. If this happens, no additional users will be able to connect to the front-end server, and processes for connecting to the front-end server will be retried. These processes will be retried only for the amount of time equal to the sum of the values specified in the pd_ha_trn_queuing_wait_time and pd_ha_trn_restart_retry_time operands.

(d) When the BES connection holding facility is used

For notes on using the BES connection holding facility, see E.1(3)(c) Setting the maximum client wait time.