Recover the Replicated Database forcefully after restoring database metadata in Keeper#85960
Conversation
…etadata in Keeper
|
Workflow [PR], commit [22dba5d] Summary: ❌
|
|
The changelog category should probably be bugfix, if I understand it correctly |
I thought it also fixes the CI failed tests: https://github.com/ClickHouse/ClickHouse/issues?q=state%3Aclosed%20label%3Apr-ci |
|
e21a13b
Well, in this list I see the changes to CI itself and test fixes insofar as fixing the test itself, I don't see any bugfixes that change our main code. And if I understand correctly this PR fixes a real bug found in the test, but not the test itself. |
I updated the category. |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Recover the Replicated Database forcefully after restoring the database metadata in Keeper.
The issue in #85664 is that when restoring metadata, it sets the digest of the replica to "0" in
DatabaseReplicated::createReplicaNodesInZooKeeper.If another node restores the table metadata, it will just reinitialize the DDL Worker.
When restarting, the DB might not has any tables locally, and the local digest is 0, it matches to the keeper digest, so it won't update the restored metadata.
In this PR, after restoring database metadata in Keeper, before reinitializing the DDL Worker, set the replica digest to 42 to force the database to recover to update the restored metadata.
Closes #85664
Documentation entry for user-facing changes