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

[no-release-notes] go: sqle: Change how we run background threads for replication hooks. Add session lifecycle callbacks for replication hooks. #8848

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

reltuk
Copy link
Contributor

@reltuk reltuk commented Feb 11, 2025

This PR moves aims to add session lifecycle callbacks to the async replication thread that each push-on-write replication database runs. In order to accomplish this, we move the initialization of those background threads to be later in the process of our construction of the SqlEngine. We also have to move the installation of the InitDatabaseHook which is responsible for setting up replication on newly created databases to be later in the initialization, as opposed to installing it immediately when we construct the DatabaseProvider.

…nitialization.

Do not do it immediately when we create the hook itself, since at
that time we may not have all the machinery in place to get the
dependencies of the threads.

Also moves the installation of the replication hook init database hook to a
separate call on the DoltDatabaseProvider, instead of always installing those
hooks.
@reltuk reltuk marked this pull request as ready for review February 11, 2025 03:56
@coffeegoddd
Copy link
Contributor

@reltuk DOLT

comparing_percentages
100.000000 to 100.000000
version result total
8c2a69b ok 5937457
version total_tests
8c2a69b 5937457
correctness_percentage
100.0

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

Successfully merging this pull request may close these issues.

2 participants