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

Add option to clear all replicas in ZK #212

Merged
merged 5 commits into from
Mar 20, 2025

Conversation

kirillgarbar
Copy link
Contributor

REPLICA_ONLY was default option before

@kirillgarbar
Copy link
Contributor Author

Maybe zookeeper logging level should be set to INFO instead of DEBUG, because when ALL_REPLICAS is enabled, debug message for each deleted ZK node will be added to the log

return

try:
zk_client.delete(full_table_zk_path, recursive=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

some time ago we already had removing metadata from zk with kazoo.delete and it's performance is awful. With system drop replica cleanup much more faster, lets use it rather zk_client.delete.

Regarding this, suggesting to keep only _clean_replica_only (mb rename to _clean_table_replica) and call it for all replicas in the table. But please make manual testing with concurrent system drop replica for single table.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But please make manual testing with concurrent system drop replica for single table

Judging by drop replica's implementation, there is no race condition for concurrent drops, so it should work fine.

@Alex-Burmak Alex-Burmak merged commit 7bedde7 into yandex:main Mar 20, 2025
26 of 27 checks passed
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.

3 participants