mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
remove dangerous optimisation
This commit is contained in:
parent
56fa3cc1eb
commit
f683437a8c
@ -31,11 +31,6 @@ JoinSwitcher::JoinSwitcher(std::shared_ptr<AnalyzedJoin> table_join_, const Bloc
|
||||
|
||||
bool JoinSwitcher::addJoinedBlock(const Block & block, bool)
|
||||
{
|
||||
/// Trying to make MergeJoin without lock
|
||||
|
||||
if (switched.load(std::memory_order_relaxed))
|
||||
return join->addJoinedBlock(block);
|
||||
|
||||
std::lock_guard lock(switch_mutex);
|
||||
|
||||
if (switched)
|
||||
|
@ -64,7 +64,7 @@ public:
|
||||
private:
|
||||
JoinPtr join;
|
||||
SizeLimits limits;
|
||||
mutable std::atomic<bool> switched;
|
||||
bool switched;
|
||||
mutable std::mutex switch_mutex;
|
||||
std::shared_ptr<AnalyzedJoin> table_join;
|
||||
const Block right_sample_block;
|
||||
|
Loading…
Reference in New Issue
Block a user