Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pg_chameleon status incorrect if initialisation fails for single table due to lock timeout #152

Open
markosutic opened this issue Nov 25, 2022 · 0 comments
Assignees

Comments

@markosutic
Copy link

Describe the bug
When PostgreSQL replica initialisation is issued pg_chameleon needs to acquire short FLUSH TABLES WITH READ LOCK to get table snapshot. If it is not able to acquire lock it will fail for specified table with info message in the log:

2022-11-24 21:22:38 MainProcess INFO: Copying the source table t123 into testsch_tmp.t123
2022-11-24 21:23:08 MainProcess INFO: Could not copy the table t123. Excluding it from the replica.
2022-11-24 21:23:08 MainProcess CRITICAL: init replica for source mysql failed

But show status will not show that we have excluded table from the replication and we can proceed with replicating data.

To Reproduce

  • set lock_wait_timeout on source (MySQL) side
  • open transaction on source (MySQL)
  • run initialisation from pg_chameleon
  • wait for lock_wait_timeout to terminate pg_chameleon session
  • start replication
  • check pg_chameleon status

Expected behavior
It would be expected to see that we have excluded table from the replication if pg_chameleon fails to acquire lock to get snapshot for a table.

Environment(please complete the following information):

  • OS: Centos 7
  • MySQL Version 5.6.51
  • PostgreSQL Version 14
  • Python Version 3.6
@the4thdoctor the4thdoctor self-assigned this Nov 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants