mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-29 19:12:03 +00:00
better method name
This commit is contained in:
parent
eb88166763
commit
4cfc8d1a34
@ -4841,7 +4841,7 @@ PartUUIDsPtr Context::getIgnoredPartUUIDs() const
|
||||
return ignored_part_uuids;
|
||||
}
|
||||
|
||||
AsynchronousInsertQueue * Context::getAsynchronousInsertQueue() const
|
||||
AsynchronousInsertQueue * Context::tryGetAsynchronousInsertQueue() const
|
||||
{
|
||||
std::lock_guard lock(mutex);
|
||||
return shared->async_insert_queue.get();
|
||||
|
@ -1203,7 +1203,7 @@ public:
|
||||
PartUUIDsPtr getPartUUIDs() const;
|
||||
PartUUIDsPtr getIgnoredPartUUIDs() const;
|
||||
|
||||
AsynchronousInsertQueue * getAsynchronousInsertQueue() const;
|
||||
AsynchronousInsertQueue * tryGetAsynchronousInsertQueue() const;
|
||||
void setAsynchronousInsertQueue(const std::shared_ptr<AsynchronousInsertQueue> & ptr);
|
||||
|
||||
ReadTaskCallback getReadTaskCallback() const;
|
||||
|
@ -692,7 +692,7 @@ BlockIO InterpreterSystemQuery::execute()
|
||||
case Type::FLUSH_ASYNC_INSERT_QUEUE:
|
||||
{
|
||||
getContext()->checkAccess(AccessType::SYSTEM_FLUSH_ASYNC_INSERT_QUEUE);
|
||||
auto * queue = getContext()->getAsynchronousInsertQueue();
|
||||
auto * queue = getContext()->tryGetAsynchronousInsertQueue();
|
||||
if (!queue)
|
||||
throw Exception(ErrorCodes::BAD_ARGUMENTS,
|
||||
"Cannot flush asynchronous insert queue because it is not initialized");
|
||||
|
@ -924,7 +924,7 @@ static std::tuple<ASTPtr, BlockIO> executeQueryImpl(
|
||||
std::unique_ptr<IInterpreter> interpreter;
|
||||
|
||||
bool async_insert = false;
|
||||
auto * queue = context->getAsynchronousInsertQueue();
|
||||
auto * queue = context->tryGetAsynchronousInsertQueue();
|
||||
auto * logger = &Poco::Logger::get("executeQuery");
|
||||
|
||||
if (insert_query && async_insert_enabled)
|
||||
|
@ -907,7 +907,7 @@ void TCPHandler::processInsertQuery()
|
||||
Block processed_block;
|
||||
const auto & settings = query_context->getSettingsRef();
|
||||
|
||||
auto * insert_queue = query_context->getAsynchronousInsertQueue();
|
||||
auto * insert_queue = query_context->tryGetAsynchronousInsertQueue();
|
||||
const auto & insert_query = assert_cast<const ASTInsertQuery &>(*state.parsed_query);
|
||||
|
||||
bool async_insert_enabled = settings.async_insert;
|
||||
|
@ -34,7 +34,7 @@ void StorageSystemAsynchronousInserts::fillData(MutableColumns & res_columns, Co
|
||||
{
|
||||
using namespace std::chrono;
|
||||
|
||||
auto * insert_queue = context->getAsynchronousInsertQueue();
|
||||
auto * insert_queue = context->tryGetAsynchronousInsertQueue();
|
||||
if (!insert_queue)
|
||||
return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user