mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-12 02:23:14 +00:00
debug stress address
This commit is contained in:
parent
591325468b
commit
3ecb66d965
@ -1612,16 +1612,18 @@ void MergeTreeData::freezeAll(const String & with_name, const Context & context)
|
||||
|
||||
bool MergeTreeData::AlterDataPartTransaction::isValid() const
|
||||
{
|
||||
return data_part != nullptr;
|
||||
return valid && data_part;
|
||||
}
|
||||
|
||||
void MergeTreeData::AlterDataPartTransaction::clear()
|
||||
{
|
||||
data_part = nullptr;
|
||||
valid = false;
|
||||
}
|
||||
|
||||
void MergeTreeData::AlterDataPartTransaction::commit()
|
||||
{
|
||||
if (!isValid())
|
||||
return;
|
||||
if (!data_part)
|
||||
return;
|
||||
|
||||
@ -1682,13 +1684,14 @@ void MergeTreeData::AlterDataPartTransaction::commit()
|
||||
|
||||
MergeTreeData::AlterDataPartTransaction::~AlterDataPartTransaction()
|
||||
{
|
||||
alter_lock.unlock();
|
||||
|
||||
if (!isValid())
|
||||
return;
|
||||
if (!data_part)
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
if (!data_part)
|
||||
return;
|
||||
|
||||
LOG_WARNING(data_part->storage.log, "Aborting ALTER of part " << data_part->relative_path);
|
||||
|
||||
String path = data_part->getFullPath();
|
||||
|
@ -235,6 +235,9 @@ public:
|
||||
friend class MergeTreeData;
|
||||
void clear();
|
||||
|
||||
bool valid = true;
|
||||
|
||||
//don't interchange order of data_part & alter_lock
|
||||
DataPartPtr data_part;
|
||||
DataPartsLock alter_lock;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user