mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-14 02:12:21 +00:00
Better shutdown handling
This commit is contained in:
parent
929e400e79
commit
26a8aa441c
@ -5763,6 +5763,9 @@ void StorageReplicatedMergeTree::alter(
|
|||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
|
if (shutdown_called || partial_shutdown_called)
|
||||||
|
throw Exception(ErrorCodes::ABORTED, "Cannot assing alter because shutdown called");
|
||||||
|
|
||||||
bool pulled_queue = false;
|
bool pulled_queue = false;
|
||||||
std::optional<int32_t> maybe_mutations_version_after_logs_pull;
|
std::optional<int32_t> maybe_mutations_version_after_logs_pull;
|
||||||
std::map<std::string, MutationCommands> unfinished_mutations;
|
std::map<std::string, MutationCommands> unfinished_mutations;
|
||||||
@ -5770,6 +5773,9 @@ void StorageReplicatedMergeTree::alter(
|
|||||||
{
|
{
|
||||||
if (command.isDropSomething())
|
if (command.isDropSomething())
|
||||||
{
|
{
|
||||||
|
if (shutdown_called || partial_shutdown_called)
|
||||||
|
throw Exception(ErrorCodes::ABORTED, "Cannot assing alter because shutdown called");
|
||||||
|
|
||||||
if (!pulled_queue)
|
if (!pulled_queue)
|
||||||
{
|
{
|
||||||
auto [_, mutations_version] = queue.pullLogsToQueue(zookeeper, {}, ReplicatedMergeTreeQueue::SYNC);
|
auto [_, mutations_version] = queue.pullLogsToQueue(zookeeper, {}, ReplicatedMergeTreeQueue::SYNC);
|
||||||
|
Loading…
Reference in New Issue
Block a user