Nonstop Database, HiRDB Version 9 UAP Development Guide
When an error occurs in a UAP, measures must be taken to prevent the entire HiRDB system from halting. This section explains the following three methods of recovering from UAP errors:
The following table shows the UAP error types and recovery methods.
Table 11-5 UAP error types and recovery methods
Error type | Detection method | System action | Recovery method |
---|---|---|---|
UAP abnormal termination | UAP processing time Monitoring | Disconnects the UAP | UAP transaction rollback |
UAP endless loop | |||
Transaction incomplete | |||
UAP processing error | Various error detection at the servers#1 | Sends error response to UAP | Transaction rollback by UAP instruction |
Error detection and rollback request by UAP | Error detection by UAP | Follows an instruction from UAP | |
Deadlock | HiRDB deadlock detection | Sends error response to UAP (implicit rollback) | Termination of UAP transaction |
Memory shortage | Error during memory allocation | Disables UAP activation | Reevaluate shared memory and process-specific memory#2 |
#1: Front-end or back-end server.
#2: Request that the HiRDB system administrator re-evaluate shared memory and process-specific memory.
When a UAP is executed, HiRDB's UAP monitors the processing time to prevent a UAP error from halting the HiRDB processing for an extended period of time.
For time monitoring, a monitoring time must be specified in the PDSWAITTIME environment variable during client environment definition; if omitted, the UAP monitors by HiRDB's default monitoring time.
For details about client environment definition, see 6.6 Client environment definitions (setting environment variables).
A HiRDB/Parallel Server returns an error status to the UAP when an error, such as a database processing error, is detected at the front-end server or back-end server while executing SQL statements; steps such as process disconnection must be taken. When a UAP issues a rollback request in response to an error status, HiRDB performs a recovery process.
When an error is detected in a UAP, a recovery process is started when a rollback request is issued. If the UAP was processed normally, the process is disconnected based on a disconnection instruction from the UAP.
When a shortage occurs in the shared memory or process-specific memory, a message is output indicating the memory or disk space shortage. When such a message is output, enough memory to activate the UAP must be allocated and the UAP must be re-executed.
For details about how to check and, if necessary, revise shared memory and process-specific memory, see the HiRDB Version 9 Installation and Design Guide or contact the HiRDB system administrator.
All Rights Reserved. Copyright (C) 2011, Hitachi, Ltd.