Named counter recovery
Named counters are only stored in a structure in the CF, and updates to the counters are not logged. Applications that use named counters might therefore need to implement recovery logic to handle the loss of the named counter structure.
The simplest way to protect yourself from the loss of a named counter structure is to use System-Managed Duplexing for those structures. Typically, the access rate to the structure is not high, so the cost of duplexing the requests is usually acceptable, particularly considering the impact if the structure were to be lost. Also, if the named counter structure is lost and it is not duplexed, all the named counter server address spaces that use that structure abend.
- Loss of the named counter CF structure
If the named counter structure is lost, all the connected named counter server address spaces abend. Consider using the Automatic Restart Manager (ARM) to automatically restart the server address spaces on the same system on which they were running before the failure. The first server address space to start detects that its structure is not allocated and allocates a new, empty instance in an alternate CF. You must have a process that restores the structure contents before any applications use the service again.
- Abend of a named counter server address space
The failure of a named counter server address space impacts any applications on that system that try to use the service. However, it does not have any impact on the contents of the named counter structure. In this case, consider using ARM to automatically restart the failed server address space on the same system on which it was running before the failure. No additional recovery is required.
- Failure of a system where a named counter server address space
is running
If the system where a named counter server address space is running fails, let your normal system start process start the address space as it would after any IPL. There is no benefit from starting the address space on any other system.
It is sensible to have a tested mechanism to recreate the contents of the counters. For example, if you do not duplex the structure and the CF containing the structure fails, the contents are lost. Even if you do duplex the structure, an event such as a power failure can still result in the loss of all the counters contents. If a named counter is being used only for temporary information that does not need to be preserved across a structure failure (for example, unique identifiers for active processes that are not expected to survive such a failure), then recovery techniques can be minimal. For example, you can recreate the counter with a standard initial value. However, if a named counter is being used for persistent information, such as an order number, re-creating it might require specific application logic to reconstruct the counter value.
For information about techniques that you can use to recover the counter values following a loss of the named counter structure, see Named counter recovery.