gtpc3m1oConcepts and Structures

Duplication of Records

Record duplication addresses the design objectives of the TPF system of:

by providing the ability to maintain two copies of critical data records.

Remember from Record Duplication that there are two copies of a record on the database, which are referred to as the primary record and the backup record (sometimes called the duplicate record or dupe).

There is a trade-off between performance and resources (modules hardware) versus system reliability and integrity when dealing with record duplication because there is some overhead to manage two copies of a data record (for example, two I/O commands are issued). However, this is offset with an improvement in accessing the data record because there is an alternate path to the data in case there is disk contention.

Primary and backup records must be allocated to the same logical device type. Allocation of fixed and pool data can be specified as:

An entire database can be duplicated, in which case the attribute of duplicate is redundant. Only long-term pool records can be duplicated in a selectively duplicated module configuration, which is the significance of SDPx, LDPx, and 4DPx.

The allocation procedure assigns two database ordinal numbers (DBONs) to a duplicated record, each to different modules.

In a selectively duplicated system, non-duplicated pool records are spread across all modules (primary and duplicated modules) while the duplicated pool records are allocated so that the primary pool records are located on the primary modules and the backup pool records are located on the duplicate modules.

As a matter of fact, in a selectively duplicated system for a fixed file that is not duplicated, backup records are reserved on the duplicate module in order to preserve the mapping for the remainder of the module. For such records, only a single write (for the primary record) is performed by the file macros.

Non-duplicated data and selectively duplicated data are supported to remain compatible with the past. Fully duplicated is always recommended.

Records are always allocated on a module to module basis, which means the backup record within a record type (either pool or fixed) is assigned to the same relative position as the primary record on an alternate disk module. Duplication of records can only be utilized with configurations that have an even number of modules because the primary and backup copies of records must appear at the same location on the primary and duplicate modules respectively.

Figure 37 shows the way of allocating duplicate records across the modules. The figure demonstrates the relationship of the primary and backup records within a record type; the figure does not imply that all primary or backup records of a given record type are allocated to the same module. The notations Pn and Dn are used to denote primary addresses and the corresponding backup (duplicate) addresses within a record type.

Figure 37. Module to Module Duplication


The file macro service routine updates both the primary and backup records if both exist. The find macro service routine retrieves either copy based on which disk device has the smallest I/O queue or the inability to retrieve one of the copies. Macros are provided for application programs to selectively read or write only the primary or duplicate copy of a record.

In a loosely coupled environment, only the prime record is retrieved because the record hold table for the LC complex is contained in the external lock facility (XLF).