Administering a Coordinated Replicat Configuration
This section contains instructions for coordinating threads and re-partitioning the workload among new or different threads. A coordinated Replicat should be stopped cleanly with the STOP REPLICAT
command before making modifications to the partition specifications in THREAD
or THREADRANGE
clauses of the MAP
statements. A clean stop ensures that all of the threads, which may be at different locations in the trail at any given point, all finish their work and arrive at a common trail location.
At startup, Replicat issues an error and abends if it detects that the last shutdown was not clean and the partitioning in the MAP
statements was changed to contain a different number of threads (threads were added or removed). However, if the same threads are kept in the parameter file but simply rearranged among different MAP
statements, Replicat issues a warning but does not abend. This can result in missing or duplicate records, because there is no way to ensure continuity of the thread-to-workload allocations from the previous run.
The following is an example of this condition.
Following is the original partitioning scheme:
MAP source, target, THREADRANGE(1-5); MAP source1, target1, THREADRANGE(6-10);
The following re-partitioning of the original scheme produces only a warning:
MAP source, target, THREADRANGE(1-4); MAP source1, target1, THREADRANGE(5-10);
This section provides instructions for cleanly shutting down Replicat before performing a re-partitioning, as well as instructions for attempting to recover Replicat continuity when a re-partitioning is performed after an unclean shutdown.
The following tasks can be performed for a Replicat group in coordinated mode.
Performing a Planned Re-partitioning of the Workload
A planned re-partitioning is when Replicat is allowed to shut down cleanly before it is started again with a new parameter file that contains updated thread partitioning. A clean shutdown enables all of the threads to arrive at a common checkpoint position in the trail. At that point, the new partitioning scheme can be applied in the next run.
Recovering Replicat After an Unplanned Re-partitioning
An unplanned re-partitioning is when Replicat is not allowed to shut down cleanly before it is started again with a new parameter file that contains updated thread partitioning. In this scenario, some or all of the old threads were not able to finish their work and arrive at a common checkpoint. Upon restart, the coordinator thread attempts to apply the old partitioning scheme, and Replicat abends with an error. You can recover the coordinated Replicat group from this condition in one of the following ways:
-
Use the auto-saved copy of the parameter file
-
Reprocess from the low watermark with
HANDLECOLLISIONS
Reprocessing From the Low Watermark with HANDLECOLLISIONS
In this procedure, you reposition all of the threads to the low watermark position. This is the earliest checkpoint position performed among all of the threads. To state it another way, the low watermark position is the last record processed by the slowest thread before the unclean stop. When you start Replicat, the threads reprocess the operations that they were processing before Replicat stopped, and the HANDLECOLLISIONS
parameter handles any duplicate-record and missing-record errors that occur as the faster threads reprocess operations that they applied before the unclean stop.
Using the Auto-Saved Parameter File
A copy of the original parameter file is saved whenever the parameter file is edited before shutting down Replicat cleanly. You can revert to this parameter file and then resynchronize the threads so that they all catch up to the thread that had the most recent checkpoint position. Once the threads are synchronized, you can switch to the new parameter file and then start Replicat.