Consistency Drift
Replicas can silently drift from the primary over time due to errors or direct writes. Use pt-table-checksum and pt-table-sync to detect and fix drift.
Replicas can silently drift from the primary over time due to errors or direct writes. Use pt-table-checksum and pt-table-sync to detect and fix drift.
# Percona Toolkit: check consistency
pt-table-checksum --databases mydb h=primary,u=root,p=pass
# Output shows chunks that differ between primary and replica
# Fix inconsistencies
pt-table-sync --execute --replicate=percona.checksums h=primary
# Check for writes on replica (should be zero)
SHOW STATUS LIKE "Com_insert";
SHOW STATUS LIKE "Com_update";
SHOW STATUS LIKE "Com_delete";
Set super_read_only=ON on replicas to prevent accidental direct writes that cause drift.