mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-29 13:10:48 +00:00
Reset IO after each dump
This commit is contained in:
parent
484528ba2c
commit
afd6639e46
@ -2,17 +2,16 @@
|
||||
|
||||
#include <Core/Settings.h>
|
||||
#include <DataStreams/BlockIO.h>
|
||||
#include <DataStreams/copyData.h>
|
||||
#include <DataStreams/IBlockStream_fwd.h>
|
||||
#include <DataStreams/InputStreamFromASTInsertQuery.h>
|
||||
#include <DataStreams/copyData.h>
|
||||
#include <IO/ConcatReadBuffer.h>
|
||||
#include <IO/ReadBufferFromMemory.h>
|
||||
#include <IO/ReadBufferFromString.h>
|
||||
#include <IO/copyData.h>
|
||||
#include <Parsers/ASTInsertQuery.h>
|
||||
#include <Parsers/formatAST.h>
|
||||
#include <Common/getNumberOfPhysicalCPUCores.h>
|
||||
#include "IO/WriteBufferFromOStream.h"
|
||||
#include "Parsers/formatAST.h"
|
||||
|
||||
|
||||
namespace DB
|
||||
@ -168,7 +167,7 @@ void AsynchronousInsertQueue::busyCheck()
|
||||
|
||||
void AsynchronousInsertQueue::staleCheck()
|
||||
{
|
||||
while(!shutdown)
|
||||
while (!shutdown)
|
||||
{
|
||||
std::this_thread::sleep_for(stale_timeout);
|
||||
|
||||
@ -242,6 +241,7 @@ void AsynchronousInsertQueue::processData(std::shared_ptr<InsertData> data)
|
||||
in->appendBuffer(std::make_unique<ReadBufferFromString>(datum));
|
||||
copyData(*in, *data->io.out, [] {return false;}, log_progress);
|
||||
|
||||
data->io = BlockIO(); /// Release all potential table locks
|
||||
data->reset = true;
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ class AsynchronousInsertQueue
|
||||
ThreadPool pool; /// dump the data only inside this pool.
|
||||
ThreadFromGlobalPool dump_by_first_update_thread; /// uses busy_timeout and busyCheck()
|
||||
ThreadFromGlobalPool dump_by_last_update_thread; /// uses stale_timeout and staleCheck()
|
||||
/// TODO: ThreadFromGlobalPool remove_empty_thread, check_access_thread;
|
||||
/// TODO: ThreadFromGlobalPool check_access_thread;
|
||||
|
||||
void busyCheck();
|
||||
void staleCheck();
|
||||
|
Loading…
Reference in New Issue
Block a user