mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-14 18:32:29 +00:00
Fxi
This commit is contained in:
parent
0621b79d1a
commit
23bde28ac4
@ -677,7 +677,7 @@ void IMergeTreeDataPart::loadColumnsChecksumsIndexes(bool require_columns_checks
|
||||
if (!parent_part)
|
||||
{
|
||||
loadTTLInfos();
|
||||
has_broken_projections = !loadProjections(require_columns_checksums, check_consistency, false /* if_not_loaded */);
|
||||
loadProjections(require_columns_checksums, check_consistency, has_broken_projections, false /* if_not_loaded */);
|
||||
}
|
||||
|
||||
if (check_consistency && !has_broken_projections)
|
||||
@ -742,10 +742,9 @@ void IMergeTreeDataPart::addProjectionPart(
|
||||
projection_parts[projection_name] = std::move(projection_part);
|
||||
}
|
||||
|
||||
bool IMergeTreeDataPart::loadProjections(bool require_columns_checksums, bool check_consistency, bool if_not_loaded)
|
||||
void IMergeTreeDataPart::loadProjections(bool require_columns_checksums, bool check_consistency, bool & has_broken_projection, bool if_not_loaded)
|
||||
{
|
||||
auto metadata_snapshot = storage.getInMemoryMetadataPtr();
|
||||
bool has_broken_projection = false;
|
||||
for (const auto & projection : metadata_snapshot->projections)
|
||||
{
|
||||
auto path = projection.name + ".proj";
|
||||
@ -782,7 +781,6 @@ bool IMergeTreeDataPart::loadProjections(bool require_columns_checksums, bool ch
|
||||
}
|
||||
}
|
||||
}
|
||||
return has_broken_projection;
|
||||
}
|
||||
|
||||
void IMergeTreeDataPart::loadIndexGranularity()
|
||||
|
@ -434,7 +434,7 @@ public:
|
||||
bool hasBrokenProjection(const String & projection_name) const;
|
||||
|
||||
/// Return true, if all projections were loaded successfully and none was marked as broken.
|
||||
bool loadProjections(bool require_columns_checksums, bool check_consistency, bool if_not_loaded = false);
|
||||
void loadProjections(bool require_columns_checksums, bool check_consistency, bool & has_broken_projection, bool if_not_loaded = false);
|
||||
|
||||
void setBrokenReason(const String & message, int code) const;
|
||||
|
||||
|
@ -870,7 +870,8 @@ void finalizeMutatedPart(
|
||||
new_data_part->modification_time = time(nullptr);
|
||||
|
||||
/// Load rest projections which are hardlinked
|
||||
new_data_part->loadProjections(false, false, true /* if_not_loaded */);
|
||||
bool noop;
|
||||
new_data_part->loadProjections(false, false, noop, true /* if_not_loaded */);
|
||||
|
||||
/// All information about sizes is stored in checksums.
|
||||
/// It doesn't make sense to touch filesystem for sizes.
|
||||
@ -1570,8 +1571,9 @@ private:
|
||||
|
||||
void finalize()
|
||||
{
|
||||
bool noop;
|
||||
ctx->new_data_part->minmax_idx = std::move(ctx->minmax_idx);
|
||||
ctx->new_data_part->loadProjections(false, false, true /* if_not_loaded */);
|
||||
ctx->new_data_part->loadProjections(false, false, noop, true /* if_not_loaded */);
|
||||
ctx->mutating_executor.reset();
|
||||
ctx->mutating_pipeline.reset();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user