| 1350 | } |
| 1351 | |
| 1352 | bool MergeTreeMetaBase::isPartInTTLDestination(const TTLDescription & ttl, const IMergeTreeDataPart & part) const |
| 1353 | { |
| 1354 | auto policy = getStoragePolicy(IStorage::StorageLocation::MAIN); |
| 1355 | if (ttl.destination_type == DataDestinationType::VOLUME) |
| 1356 | { |
| 1357 | for (const auto & disk : policy->getVolumeByName(ttl.destination_name, true)->getDisks()) |
| 1358 | if (disk->getName() == part.volume->getDisk()->getName()) |
| 1359 | return true; |
| 1360 | } |
| 1361 | else if (ttl.destination_type == DataDestinationType::DISK) |
| 1362 | return policy->getDiskByName(ttl.destination_name)->getName() == part.volume->getDisk()->getName(); |
| 1363 | return false; |
| 1364 | } |
| 1365 | |
| 1366 | CompressionCodecPtr MergeTreeMetaBase::getCompressionCodecForPart(size_t part_size_compressed, const IMergeTreeDataPart::TTLInfos & ttl_infos, time_t current_time) const |
| 1367 | { |
no test coverage detected