mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
Merge pull request #14926 from ClickHouse/better-drop-replicated-table
Better drop for Replicated tables
This commit is contained in:
commit
3536ac1b17
@ -697,7 +697,9 @@ void StorageReplicatedMergeTree::drop()
|
||||
|
||||
if (has_metadata_in_zookeeper)
|
||||
{
|
||||
auto zookeeper = tryGetZooKeeper();
|
||||
/// Table can be shut down, restarting thread is not active
|
||||
/// and calling StorageReplicatedMergeTree::getZooKeeper() won't suffice.
|
||||
auto zookeeper = global_context.getZooKeeper();
|
||||
|
||||
/// If probably there is metadata in ZooKeeper, we don't allow to drop the table.
|
||||
if (is_readonly || !zookeeper)
|
||||
|
Loading…
Reference in New Issue
Block a user