When an archive with a group read HUT lock is finished, the archive may contain partial results of a concurrently executing update transaction. Consider the following example:
- The archive operation reads row 1 and sends it to the client.
- Transaction A reads and updates row 3.
- The archive operation reads row 2 and sends it to the client.
- Transaction A reads and updates row 1.
- Transaction A ends, releasing its HUT lock on rows 1 and 3.
- The archive operation reads row 3 and sends it to the client.
The archive described above contains:
- A copy of row 3 after an update by transaction A, and
- A copy of row 1 before its update by the transaction.
For this reason, define an after-image permanent journal for tables to be archived using a group read HUT lock. After the archive finishes, archive the corresponding journal. The after-images on the journal archive provide a consistent view of any transaction that executes concurrently with the archive.