mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
Fix clang tidy and race
This commit is contained in:
parent
8cdb181c39
commit
e618dd05cc
@ -2285,6 +2285,7 @@ void Server::updateServers(
|
||||
|
||||
Poco::Util::AbstractConfiguration & previous_config = latest_config ? *latest_config : this->config();
|
||||
std::vector<ProtocolServerAdapter *> all_servers;
|
||||
all_servers.reserve(servers.size() + servers_to_start_before_tables.size());
|
||||
for (auto & server : servers)
|
||||
all_servers.push_back(&server);
|
||||
|
||||
|
@ -4890,14 +4890,23 @@ void StorageReplicatedMergeTree::shutdown()
|
||||
if (shutdown_called.exchange(true))
|
||||
return;
|
||||
|
||||
if (!shutdown_prepared_called.load())
|
||||
flushAndPrepareForShutdown();
|
||||
|
||||
auto settings_ptr = getSettings();
|
||||
if (!shutdown_deadline.has_value())
|
||||
throw Exception(ErrorCodes::LOGICAL_ERROR, "Shutdown deadline is not set in shutdown");
|
||||
|
||||
try
|
||||
{
|
||||
waitForUniquePartsToBeFetchedByOtherReplicas(*shutdown_deadline);
|
||||
}
|
||||
catch (const Exception & ex)
|
||||
{
|
||||
if (ex.code() == ErrorCodes::LOGICAL_ERROR)
|
||||
throw;
|
||||
|
||||
tryLogCurrentException(log, __PRETTY_FUNCTION__);
|
||||
}
|
||||
|
||||
session_expired_callback_handler.reset();
|
||||
stopOutdatedDataPartsLoadingTask();
|
||||
@ -4905,7 +4914,6 @@ void StorageReplicatedMergeTree::shutdown()
|
||||
partialShutdown();
|
||||
|
||||
part_moves_between_shards_orchestrator.shutdown();
|
||||
background_operations_assignee.finish();
|
||||
|
||||
{
|
||||
auto lock = queue.lockQueue();
|
||||
|
Loading…
Reference in New Issue
Block a user