Repair inconsistencies by time stamp
You can repair inconsistencies based on the latest time stamps among the participants instead of specifying a master server.
If your replicates use the time stamp or delete wins conflict resolution rule, you can repair inconsistencies between the participants based on the latest time stamp on any participant. If you run a time stamp repair, you do not specify a master server whose data is considered correct and to which all the other participants are matched.
To ensure that a time stamp repair is accurate, follow these guidelines:
- When you need to temporarily stop replication on a server, disable it with the cdr disable server command instead of stopping it with cdr stop command.
- If you are using the delete wins conflict resolution rule, set the CDR_DELAY_PURGE_DTC configuration parameter on all replication servers to the maximum age of modifications to rows that are being actively updated.
To run a time stamp repair, use the cdr check replicate or cdr check replicateset command with the --repair and --timestamp options. If your replicates use the delete wins conflict resolution rule, also include the --deletewins option.
If a time stamp repair finds an extra row on any participant, the result depends on the conflict resolution rule and the last transaction for that row:
- If the conflict rule is time stamp and the most recent time stamp for the row is a delete transaction, the row will be deleted on all servers.
- If the conflict rule is time stamp and a participant has a deleted row but the most recent time stamp for that row is an update transaction, the updated row is replicated to all servers.
- If the conflict rule is delete wins and any participant has deleted that row, the row is deleted from all servers, regardless of any later update transactions.
If a time stamp repair finds mismatched rows on different servers, then the most recent update transaction for that row is replicated to the other server.