mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-16 19:32:07 +00:00
25 lines
455 B
C++
25 lines
455 B
C++
|
#include <Storages/MergeTree/TemporaryParts.h>
|
||
|
|
||
|
namespace DB
|
||
|
{
|
||
|
|
||
|
bool TemporaryParts::contains(const std::string & basename) const
|
||
|
{
|
||
|
std::lock_guard lock(mutex);
|
||
|
return parts.contains(basename);
|
||
|
}
|
||
|
|
||
|
void TemporaryParts::add(std::string basename)
|
||
|
{
|
||
|
std::lock_guard lock(mutex);
|
||
|
parts.emplace(std::move(basename));
|
||
|
}
|
||
|
|
||
|
void TemporaryParts::remove(const std::string & basename)
|
||
|
{
|
||
|
std::lock_guard lock(mutex);
|
||
|
parts.erase(basename);
|
||
|
}
|
||
|
|
||
|
}
|