mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-14 03:25:15 +00:00
make that old_parts_lifetime=0 deletes files instantly at drop/truncate
This commit is contained in:
parent
8218d59103
commit
90fa1ecd49
@ -2021,7 +2021,7 @@ MergeTreeData::DataPartsVector MergeTreeData::grabOldParts(bool force)
|
||||
}
|
||||
|
||||
auto part_remove_time = part->remove_time.load(std::memory_order_relaxed);
|
||||
bool reached_removal_time = part_remove_time < time_now && time_now - part_remove_time > getSettings()->old_parts_lifetime.totalSeconds();
|
||||
bool reached_removal_time = part_remove_time <= time_now && time_now - part_remove_time >= getSettings()->old_parts_lifetime.totalSeconds();
|
||||
if ((reached_removal_time && !has_skipped_mutation_parent(part))
|
||||
|| force
|
||||
|| isInMemoryPart(part) /// Remove in-memory parts immediately to not store excessive data in RAM
|
||||
|
@ -1478,8 +1478,6 @@ void StorageMergeTree::dropPartNoWaitNoThrow(const String & part_name)
|
||||
part.reset();
|
||||
|
||||
clearOldPartsFromFilesystem();
|
||||
|
||||
LOG_INFO(log, "Removed part {}.", part_name);
|
||||
}
|
||||
|
||||
/// Else nothing to do, part was removed in some different way
|
||||
|
Loading…
Reference in New Issue
Block a user