Move changes from private

This commit is contained in:
Antonio Andelic 2024-05-20 13:48:14 +02:00
parent 3d76de3fec
commit d32c059e7f
2 changed files with 15 additions and 6 deletions

View File

@ -793,7 +793,8 @@ void IMergeTreeDataPart::addProjectionPart(
projection_parts[projection_name] = std::move(projection_part);
}
void IMergeTreeDataPart::loadProjections(bool require_columns_checksums, bool check_consistency, bool & has_broken_projection, bool if_not_loaded)
void IMergeTreeDataPart::loadProjections(
bool require_columns_checksums, bool check_consistency, bool & has_broken_projection, bool if_not_loaded, bool only_metadata)
{
auto metadata_snapshot = storage.getInMemoryMetadataPtr();
for (const auto & projection : metadata_snapshot->projections)
@ -813,7 +814,10 @@ void IMergeTreeDataPart::loadProjections(bool require_columns_checksums, bool ch
try
{
part->loadColumnsChecksumsIndexes(require_columns_checksums, check_consistency);
if (only_metadata)
part->loadChecksums(require_columns_checksums);
else
part->loadColumnsChecksumsIndexes(require_columns_checksums, check_consistency);
}
catch (...)
{

View File

@ -445,7 +445,15 @@ public:
bool hasBrokenProjection(const String & projection_name) const;
/// Return true, if all projections were loaded successfully and none was marked as broken.
void loadProjections(bool require_columns_checksums, bool check_consistency, bool & has_broken_projection, bool if_not_loaded = false);
void loadProjections(
bool require_columns_checksums,
bool check_consistency,
bool & has_broken_projection,
bool if_not_loaded = false,
bool only_metadata = false);
/// If checksums.txt exists, reads file's checksums (and sizes) from it
void loadChecksums(bool require);
void setBrokenReason(const String & message, int code) const;
@ -671,9 +679,6 @@ private:
static void appendFilesOfColumns(Strings & files);
/// If checksums.txt exists, reads file's checksums (and sizes) from it
void loadChecksums(bool require);
static void appendFilesOfChecksums(Strings & files);
/// Loads marks index granularity into memory