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

Log error misleading #88

Open
akea013 opened this issue Oct 10, 2018 · 6 comments
Open

Log error misleading #88

akea013 opened this issue Oct 10, 2018 · 6 comments
Assignees

Comments

@akea013
Copy link

akea013 commented Oct 10, 2018

The logs are constantly telling me the source is consistent, the show_status command that they are inconsistent:

In pg_lib.py,
check_source_consistent method currently reads:
(pseudo code):
if source_consistent:
if source_consistent[0]:
(update t_replica_tables ...)
log(consistent)
else:
log(inconsistent)
else:
log(consistent)

Line 3306 of pg_lib.py reads:

------->------->-------self.logger.debug("The source: %s is consistent" %(self.source, ) )
I think it should read:
------->------->-------self.logger.debug("The source: %s is not consistent" %(self.source, ) )

@the4thdoctor the4thdoctor self-assigned this Oct 10, 2018
@the4thdoctor
Copy link
Owner

hi, the esternal if checks whether the source have a consistent record which describes the consistent status.

I agree the message is wrong.
can you please run the following SQL on your database to check what's returned?

https://pastebin.com/kVEtKsdT

You'll need to replace the %s with your source id.
You'll find it in the show_status output.

Thanks

@akea013
Copy link
Author

akea013 commented Oct 10, 2018 via email

@the4thdoctor
Copy link
Owner

looks like no event has been received. assuming you are not using the limit_tables option in the source, can you create and drop a dummy table?
this will produce a couple of events sufficient to trigger the consistent status.
I need to think a different way to determine the consistent status though.

@the4thdoctor
Copy link
Owner

never mind the previous comment. I'm still sleeping.
I need to reproduce this behaviour.
can you please tell me about your environment?
what I need is
mysql version
pgsql version
operating system for mysql, postgres, the replica machine (assuming is a third one)
python version and pgchameleon's version

thanks

@akea013
Copy link
Author

akea013 commented Oct 11, 2018 via email

@the4thdoctor
Copy link
Owner

thanks for the info. I'm still moving home so probably on 2/3 weeks I'll be able to look at this and the issue #87 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants