Skip to content

Conversation

@jaredmdobson
Copy link
Contributor

No description provided.

# 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:
Copy link
Owner

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.

Copy link
Contributor Author

@jaredmdobson jaredmdobson Mar 11, 2025

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

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you!

@bakwc
Copy link
Owner

bakwc commented Mar 11, 2025

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).

@bakwc bakwc merged commit 0b82465 into bakwc:master Mar 11, 2025
1 check passed
jaredmdobson added a commit to ReMatter/mysql_ch_replicator that referenced this pull request Nov 5, 2025
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

Successfully merging this pull request may close these issues.

2 participants