-
Notifications
You must be signed in to change notification settings - Fork 28
Detect missing database and recreate & Fix enum conversion uppercase to lowercase etc. #121
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
Conversation
| # ensure target database still exists | ||
| if self.target_database not in self.clickhouse_api.get_databases(): | ||
| logger.warning(f'database {self.target_database} missing in CH') | ||
| if self.initial_only: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could not remove this check.
We could start replication, and then interrupt until it finished and then continue. It will start from zero instead of trying to continue.
We should probably check for both target_database and target_database_tmp missing, and only in this case we are good to go with restarting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay i modified it, what do you think now?
My only problem with it is that on boot if the database was not there, it would just continue as if it was 🤷🏿
I'm also available to do a call as well if needed. I'm on discord at: @jaredmdobson
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you!
|
Thanks for the PR! Looks good (especially enum handling)! Left few comments about some unsafe changes, probably the easiest solution is to address them in a separate PR with additional tests (and for this PR only leave enum related changes). |
…to lowercase etc. (bakwc#121)
No description provided.