MCPcopy Create free account
hub / github.com/ByConity/ByConity / isPartInTTLDestination

Method isPartInTTLDestination

src/MergeTreeCommon/MergeTreeMetaBase.cpp:1352–1364  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1350}
1351
1352bool 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
1366CompressionCodecPtr MergeTreeMetaBase::getCompressionCodecForPart(size_t part_size_compressed, const IMergeTreeDataPart::TTLInfos & ttl_infos, time_t current_time) const
1367{

Callers 1

selectPartsForMoveMethod · 0.80

Calls 5

getVolumeByNameMethod · 0.80
getDiskByNameMethod · 0.80
getDisksMethod · 0.45
getNameMethod · 0.45
getDiskMethod · 0.45

Tested by

no test coverage detected