Latest Timestamp Conflict Detection and Resolution
When you run the ADD_AUTO_CDR
procedure in the DBMS_GOLDENGATE_ADM
package to configure a table for automatic Oracle GoldenGate conflict detection and resolution, a hidden timestamp column is added to the table. This hidden timestamp column records the time of a row change, and this information is used to detect and resolve conflicts.
When a row LCR is applied, a conflict can occur for an INSERT
, UPDATE
, or DELETE
operation. The following table describes each type of conflict and how it is resolved.
Operation | Conflict Detection | Conflict Resolution |
---|---|---|
|
A conflict is detected when the table has the same value for a key column as the new value in the row LCR. |
If the timestamp of the row LCR is later than the timestamp in the table row, then the values in the row LCR replace the values in the table. If the timestamp of the row LCR is earlier than the timestamp in the table row, then the row LCR is discarded, and the table values are retained. |
|
A conflict is detected in each of the following cases:
|
If there is a value mismatch and the timestamp of the row LCR is later than the timestamp in the table row, then the values in the row LCR replace the values in the table. If there is a value mismatch and the timestamp of the row LCR is earlier than the timestamp in the table row, then the row LCR is discarded, and the table values are retained. If the table row does not exist and the timestamp of the row LCR is later than the timestamp in the tombstone table row, then the row LCR is converted from an If the table row does not exist and the timestamp of the row LCR is earlier than the timestamp in the tombstone table row, then the row LCR is discarded. If the table row does not exist and there is no corresponding row in the tombstone table, then the row LCR is converted from an |
|
A conflict is detected in each of the following cases:
|
If the timestamp of the row LCR is later than the timestamp in the table, then delete the row from the table. If the timestamp of the row LCR is earlier than the timestamp in the table, then the row LCR is discarded, and the table values are retained. If the delete is successful, then log the row LCR by inserting it into the tombstone table. If the table row does not exist, then log the row LCR by inserting it into the tombstone table. |