mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
make TSAN happy
This commit is contained in:
parent
2110bfd278
commit
af2e86d72d
@ -81,7 +81,7 @@ void RefreshSet::emplace(StorageID id, const std::vector<StorageID> & dependenci
|
||||
throw Exception(ErrorCodes::LOGICAL_ERROR, "Refresh set entry already exists for table {}", id.getFullTableName());
|
||||
addDependenciesLocked(id, dependencies);
|
||||
|
||||
task->setRefreshSetHandle(Handle(this, id, dependencies));
|
||||
task->setRefreshSetHandleUnlock(Handle(this, id, dependencies));
|
||||
}
|
||||
|
||||
void RefreshSet::addDependenciesLocked(const StorageID & id, const std::vector<StorageID> & dependencies)
|
||||
|
@ -509,9 +509,8 @@ std::chrono::system_clock::time_point RefreshTask::currentTime() const
|
||||
return std::chrono::system_clock::time_point(std::chrono::seconds(fake));
|
||||
}
|
||||
|
||||
void RefreshTask::setRefreshSetHandle(RefreshSet::Handle && set_handle_)
|
||||
void RefreshTask::setRefreshSetHandleUnlock(RefreshSet::Handle && set_handle_)
|
||||
{
|
||||
std::lock_guard guard(mutex);
|
||||
set_handle = std::move(set_handle_);
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@ public:
|
||||
void setFakeTime(std::optional<Int64> t);
|
||||
|
||||
/// RefreshSet will set handle for refresh tasks, to avoid race condition.
|
||||
void setRefreshSetHandle(RefreshSet::Handle && set_handle_);
|
||||
void setRefreshSetHandleUnlock(RefreshSet::Handle && set_handle_);
|
||||
|
||||
private:
|
||||
LoggerPtr log = nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user