mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
try fix tests
This commit is contained in:
parent
3372dd7b6a
commit
e7a1398def
@ -110,6 +110,7 @@ void ParallelParsingInputFormat::parserThreadFunction(ThreadGroupStatusPtr threa
|
||||
{
|
||||
column_mapping = input_format->getColumnMapping();
|
||||
column_mapping->is_set = true;
|
||||
first_parser_finished.Notify();
|
||||
}
|
||||
|
||||
// We suppose we will get at least some blocks for a non-empty buffer,
|
||||
|
@ -12,6 +12,18 @@
|
||||
#include <Interpreters/Context.h>
|
||||
#include <common/logger_useful.h>
|
||||
|
||||
/// I don't know why, but clang warns about static annotations
|
||||
/// error: macro name is a reserved identifier [-Werror,-Wreserved-id-macro]
|
||||
/// #define THREAD_ANNOTATION_ATTRIBUTE__(x) __attribute__((x))
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wreserved-id-macro"
|
||||
#endif
|
||||
#include <absl/synchronization/notification.h>
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
namespace DB
|
||||
{
|
||||
|
||||
@ -202,6 +214,8 @@ private:
|
||||
std::condition_variable reader_condvar;
|
||||
std::condition_variable segmentator_condvar;
|
||||
|
||||
absl::Notification first_parser_finished;
|
||||
|
||||
std::atomic<bool> parsing_finished{false};
|
||||
|
||||
/// There are multiple "parsers", that's why we use thread pool.
|
||||
@ -255,7 +269,7 @@ private:
|
||||
});
|
||||
/// We have to wait here to possibly extract ColumnMappingPtr from the first parser.
|
||||
if (ticket_number == 0)
|
||||
pool.wait();
|
||||
first_parser_finished.WaitForNotification();
|
||||
}
|
||||
|
||||
void finishAndWait()
|
||||
|
Loading…
Reference in New Issue
Block a user