Dependency analysis

The target server supports parallel apply processing by evaluating the changes in a unit of recovery (UOR) for dependencies on changes that other UORs make.

Because Data Replication for VSAM balances transactional consistency with low latency, it places a higher priority on applying changes in order to the same record than it does on maintaining precise order for different data sets or records.

Changes to the same record of a VSAM data set

Data Replication for VSAM applies changes to the same record of a VSAM data set in the order that these changes were written to the replication log stream. For each subscription that participates in parallel apply, the target server maintains a collection of UORs, identifies dependencies, and assigns work to available writer tasks as earlier UORs complete apply processing.

With dependency analysis in effect, the target server tracks all data sets and the keys within those data sets for each UOR. Both primary keys and any secondary keys that are defined by alternate indexes are tracked. If two UORs update records with the same key in the same data set, the earlier UOR must be applied first, and the later UOR becomes dependent upon the completion of that UOR. If they do not update records with the same key in the same data set, they are not dependent on each other and can be applied in parallel.

Data Replication for VSAM also performs dependency analysis for serial subscriptions, but the memory requirements are smaller.

Dependency analysis assumes that no dependencies exist between different subscriptions.

Changes to different records or data sets

Data Replication for VSAM can also apply large numbers of UORs that update different records and data sets in approximately the same order that they occurred at the source site. The number of records and data sets that a UOR updates determines the extent to which the target server checks for dependencies.

To optimize memory and performance, the target server determines whether to track keys or affected data sets for each UOR.
  • If a UOR updates more keys than a predefined threshold, dependency analysis will stop tracking keys to reduce memory and CPU costs and track affected data set names instead.
  • If a UOR updates more data sets than the threshold, the UOR becomes dependent on all prior UORs for the subscription; all subsequent UORs for the subscription are dependent on this UOR.