mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
Merge
This commit is contained in:
parent
9f60383fee
commit
a4fe773cba
@ -52,6 +52,11 @@ public:
|
||||
return ptr->storage.get();
|
||||
}
|
||||
|
||||
size_t use_count() const
|
||||
{
|
||||
return ptr.use_count();
|
||||
}
|
||||
|
||||
bool operator == (const IStorage * p) const
|
||||
{
|
||||
return get() == p;
|
||||
|
@ -151,16 +151,15 @@ void StorageChunkMerger::dropImpl()
|
||||
|
||||
StorageChunkMerger::~StorageChunkMerger()
|
||||
{
|
||||
if (!thread_should_quit)
|
||||
{
|
||||
thread_should_quit = true;
|
||||
merge_thread.join();
|
||||
}
|
||||
merge_thread.detach();
|
||||
}
|
||||
|
||||
void StorageChunkMerger::mergeThread()
|
||||
{
|
||||
while (!thread_should_quit)
|
||||
/// Не дает удалить this посреди итерации.
|
||||
StoragePtr this_ptr = thisPtr();
|
||||
|
||||
while (!thread_should_quit && this_ptr.use_count() > 1)
|
||||
{
|
||||
bool merged = false;
|
||||
bool error = true;
|
||||
|
Loading…
Reference in New Issue
Block a user