Resynchronization Initialization Data Flow
The following list summarizes the general sequence of events in resynchronization initialization. For examples of the communication flow, see CRR Communications Examples.
- The resource adapter allocates a conversation with the resource manager and passes the CRR recovery server's TPN and log name in a data buffer. (The resource adapter previously obtained these values by calling the CSL routine DMSGETRS. See Getting Information about the CRR Recovery Server.)
- The resource manager must first determine if an exchange of log
names with the CRR recovery server is required. The resource manager
looks for:
- An entry for the CRR recovery server in the resource manager's
log, using the following data as search arguments:
- CRR recovery server's locally known LU name, obtained from the allocate data for the conversation that the resource adapter allocates with the resource manager
- CRR recovery server's TPN and log name, passed to the resource manager by the resource adapter.
Note:- In VM, a resource manager could be accessed by the resource adapters on a particular processor through more than one LU. Therefore, the resource manager's log could have multiple entries containing the same CRR recovery server log name, but each with a different LU name.
- If there is an entry for the locally known LU name and TPN, but the log name is different from the one passed by the resource adapter, the associated CRR recovery server has cold-logged (started up with a new log). The resource manager's log is considered warm, but the resource manager must initiate an Exchange Log Names request to give its own log name to the cold-logged CRR recovery server.
- A local indication that log names were exchanged. This indication
can be a local flag associated with each log name record, a local
caching of the log name record, or some other device. Whatever technique
you use, its purpose is to determine if the resource manager has exchanged
log names with the CRR recovery server during the resource manager's
current activation.
In cases where a resource manager could accidentally use the wrong log (as opposed to intentionally cold-logging), such as where logs are mounted or archived, it is important to force an exchange of log names with the CRR recovery server at least once for each activation of the resource manager to:
- Catch a warm/warm log name mismatch, where it is possible that either the CRR recovery server's log or the resource manager's log is the wrong one.
- Avoid having to check for this warm/warm mismatch on every allocation—just once each time the resource manager is activated.
- Accomplish an exchange of log names in case the CRR recovery server has erased log entries for the resource manager without cold-logging.
If conditions a and b are met and all the values match, the resource manager has previously been in communication with the CRR recovery server and no new exchange of log names is required.
If either condition is not met or any value does not match, the resource manager must initiate the exchange of log names, as described in the following steps. If the CRR recovery server's locally known LU name did not match the log or was not found, the resource manager must hold the value to be saved in the resource manager's log if the exchange of log names is successful.
- An entry for the CRR recovery server in the resource manager's
log, using the following data as search arguments:
- The resource manager allocates an APPC conversation with the CRR
recovery server, using CPI Communications (SAA communications) routines
or APPC/VM assembler interface macros. The sync level must be set
to CONFIRM.
For information about CPI Communications (the SAA communications interface), see the CPI Communications Reference. For information about APPC/VM, see the z/VM: CMS Macros and Functions Reference.
- The resource manager formulates and sends to the CRR recovery
server an Exchange Log Names request that contains:
- Log status, indicating whether the resource manager's log is cold
or warm relative to the CRR recovery server.
- If the CRR recovery server's locally known LU name (obtained from the allocate data) or TPN (obtained from the resource adapter) does not match the log or is not found, the resource manager's log status is cold.
- If the locally known LU name and TPN match the log, the resource manager's log status is warm.
- Resource manager's fully qualified LU name and TPN
- Resource manager's log name
- (Warm log only) CRR recovery server's log name saved from previous interactions.
- Log status, indicating whether the resource manager's log is cold
or warm relative to the CRR recovery server.
- The CRR recovery server receives the Exchange Log Names request
and compares the resource manager's fully qualified LU name and TPN
in the request with those saved in the recovery server's log to determine
its own log status:
- If the values match, the CRR recovery server's log status is warm.
- If either value does not match, or is not found, the CRR recovery server's log status is cold.
The CRR recovery server's subsequent actions are shown in Table 1.Table 1. Resynchronization Initialization Exchange Log Names Request. This table describes the CRR recovery server's actions after receiving the request from the resource manager. Resource Manager's Log Status Recovery Server's Log Status Recovery Server's Actions COLD or WARM COLD The recovery server saves the resource manager's fully qualified LU name, TPN, and log name in its log and sends an Exchange Log Names reply to the resource manager indicating normal completion of the request. COLD WARM The recovery server checks the work unit records in its log that relate to this resource manager: - If the records do not contain active data, the recovery server updates the resource manager's log name saved in the log and sends an Exchange Log Names reply to the resource manager indicating normal completion of the request.
- If the records contain active data, the recovery server issues CMS error message 3311E to the recovery server operator and sends an Exchange Log Names reply to the resource manager indicating abnormal completion of the request. The recovery server operator must manually resolve the error condition by forcing the active data from its log.
WARM WARM The recovery server compares the resource manager's log name sent in the request with the name that the recovery server has saved in its log. The recovery server also validates its own log name, if specified in the request. - If the log names match, the recovery server sends an Exchange Log Names reply to the resource manager indicating normal completion of the request.
- If the log names do not match, the recovery server issues CMS
message 3312E to the recovery server operator and sends an Exchange-Log-Names
reply to the resource manager indicating abnormal completion of the
request.
The log name mismatch could be caused by one partner using the wrong log. If so, that partner must be restarted with the correct log. If the correct log cannot be supplied, one or both partners must be cold-started.
- The CRR recovery server formulates and sends to the resource manager
an Exchange Log Names reply that contains:
- Function status, indicating normal or abnormal completion of the Exchange Log Names function
- Log status, indicating whether the recovery server's log is cold or warm relative to the requesting resource manager
- Recovery server's fully qualified LU name and TPN
- Recovery server's log name.
- The resource manager receives the Exchange Log Names reply. The resource manager's subsequent actions are shown in Table 2.
- The CRR recovery server deallocates the conversation.
Recovery Server's Log Status | Reply Function Status | Resource Manager's Log Status | Resource Manager's Actions |
---|---|---|---|
COLD or WARM | NORMAL | COLD | The resource manager saves or updates the recovery server's locally known LU name, fully qualified LU name, TPN, and log name in its log and sends an explicit APPC confirmation to the recovery server. |
COLD | NORMAL | WARM | The resource manager checks the work unit records
in its log that relate to the recovery server:
|
WARM | NORMAL | WARM | The resource manager compares the recovery server's
log name sent in the reply with the name that the resource manager
has saved in its log:
|
WARM | ABNORMAL | COLD or WARM | The resource manager issues its equivalent to
CMS message 3371E to the resource manager operator and does a deallocate
(abend).
The resource manager's participation in sync points must be delayed until the error condition is resolved. The resource manager operator should contact the recovery server operator to determine the reason for the error. If the problem is a log name mismatch, one of the partners might be using an incorrect log and should be restarted with the correct log. If the correct log cannot be supplied, both partners must be cold-started. |