mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Exit fixes
This commit is contained in:
parent
b2c898f58c
commit
2b3b335eda
@ -1339,13 +1339,6 @@ MergeTreeData::MutableDataPartPtr StorageReplicatedMergeTree::attachPartHelperFo
|
||||
return {};
|
||||
}
|
||||
|
||||
void StorageReplicatedMergeTree::attachPart(MutableDataPartPtr& part)
|
||||
{
|
||||
Transaction transaction(*this);
|
||||
renameTempPartAndAdd(part, nullptr, &transaction);
|
||||
checkPartChecksumsAndCommit(transaction, part);
|
||||
}
|
||||
|
||||
bool StorageReplicatedMergeTree::executeLogEntry(LogEntry & entry)
|
||||
{
|
||||
if (entry.type == LogEntry::DROP_RANGE)
|
||||
@ -1361,8 +1354,17 @@ bool StorageReplicatedMergeTree::executeLogEntry(LogEntry & entry)
|
||||
}
|
||||
|
||||
if (entry.type == LogEntry::ATTACH_PART)
|
||||
{
|
||||
if (MutableDataPartPtr part = attachPartHelperFoundValidPart(entry); part)
|
||||
attachPart(part);
|
||||
{
|
||||
Transaction transaction(*this);
|
||||
|
||||
if (renameTempPartAndAdd(part, nullptr, &transaction))
|
||||
checkPartChecksumsAndCommit(transaction, part);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
const bool is_get_or_attach = entry.type == LogEntry::GET_PART || entry.type == LogEntry::ATTACH_PART;
|
||||
|
||||
|
@ -410,9 +410,6 @@ private:
|
||||
/// returns nullptr if the part is corrupt or missing.
|
||||
MutableDataPartPtr attachPartHelperFoundValidPart(const LogEntry& entry) const;
|
||||
|
||||
/// Attach the part found in the detached/ folder
|
||||
void attachPart(MutableDataPartPtr& part);
|
||||
|
||||
void executeDropRange(const LogEntry & entry);
|
||||
|
||||
/// Do the merge or recommend to make the fetch instead of the merge
|
||||
|
Loading…
Reference in New Issue
Block a user