-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MDB-29707] Metatdata cleaner with system drop replica (#241)
* Metatdata cleaner with system drop replica * Add replicated databases in conf * Fix 22.8 * Review fixes * More fixes
- Loading branch information
1 parent
8e11eb0
commit 6502ec3
Showing
6 changed files
with
356 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from ch_tools.chadmin.internal.utils import execute_query | ||
|
||
|
||
def system_database_drop_replica(ctx, database_zk_path, replica, dry_run=False): | ||
""" | ||
Perform "SYSTEM DROP DATABASE REPLICA" query. | ||
""" | ||
timeout = ctx.obj["config"]["clickhouse"]["drop_replica_timeout"] | ||
query = f"SYSTEM DROP DATABASE REPLICA '{replica}' FROM ZKPATH '{database_zk_path}'" | ||
execute_query(ctx, query, timeout=timeout, echo=True, dry_run=dry_run, format_=None) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.