Missing Records During HVR Replication to BigQuery
Issue
When HVR replicates data from a Db2 source to a BigQuery target, some records are missing from BigQuery even though they exist in the source.
Environment
- HVR 6
- Source: Db2
- Target: Google BigQuery
Resolution
To troubleshoot this issue, do the following:
Run a Compare job in HVR:
i. Select the Keep Difference Files option to identify missing records.
ii. Review the output to determine the differences between the source and the target.
Check HVR logs:
i. Identify the timestamp of the missing records' updates, inserts, or deletes.
ii. Retrieve logs from
hvr_config/hubs/<yourhub>/logsfor those timestamps.iii. Look for suspended messages or skipped operations that align with the missing data.
Review activation and refresh activity:
i. Ensure that activation and Refresh processes don't overlap. Overlapping can result in suspensions that skip changes.
ii. Check the logs for refresh control messages, such as
refr_online, to determine whether refresh activity caused rows to be skipped.Perform a Bulk Refresh on the affected tables to ensure all missing records are caught up.
Prevent future discrepancies.
- Avoid running new activations while a previous activation or refresh is still pending.
- Ensure refresh control processing completes before workflows end.
- After refreshes, validate row counts or run targeted compares to confirm data integrity.
- Regularly review logs for control messages and skipped operations after important operations.
- Configure automated alerts for detected discrepancies, where possible.
Cause
This issue occurs when activation and refresh control processes overlap. If HVR suspends replication during an ongoing refresh, some changes may be intentionally skipped, causing discrepancies between the source and target.