mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-15 19:02:04 +00:00
fix
This commit is contained in:
parent
aa6b9a2abc
commit
711aad6953
@ -1231,7 +1231,7 @@ catch (Exception & e)
|
|||||||
|
|
||||||
bool IMergeTreeDataPart::wasInvolvedInTransaction() const
|
bool IMergeTreeDataPart::wasInvolvedInTransaction() const
|
||||||
{
|
{
|
||||||
assert(!version.creation_tid.isEmpty());
|
assert(!version.creation_tid.isEmpty() || (state == State::Temporary /* && std::uncaught_exceptions() */));
|
||||||
bool created_by_transaction = !version.creation_tid.isPrehistoric();
|
bool created_by_transaction = !version.creation_tid.isPrehistoric();
|
||||||
bool removed_by_transaction = version.isRemovalTIDLocked() && version.removal_tid_lock != Tx::PrehistoricTID.getHash();
|
bool removed_by_transaction = version.isRemovalTIDLocked() && version.removal_tid_lock != Tx::PrehistoricTID.getHash();
|
||||||
return created_by_transaction || removed_by_transaction;
|
return created_by_transaction || removed_by_transaction;
|
||||||
|
@ -1297,6 +1297,8 @@ bool MutateTask::prepare()
|
|||||||
}
|
}
|
||||||
|
|
||||||
ctx->single_disk_volume = std::make_shared<SingleDiskVolume>("volume_" + ctx->future_part->name, ctx->space_reservation->getDisk(), 0);
|
ctx->single_disk_volume = std::make_shared<SingleDiskVolume>("volume_" + ctx->future_part->name, ctx->space_reservation->getDisk(), 0);
|
||||||
|
/// FIXME new_data_part is not used in the case when we clone part with cloneAndLoadDataPartOnSameDisk and return false
|
||||||
|
/// Is it possible to handle this case earlier?
|
||||||
ctx->new_data_part = ctx->data->createPart(
|
ctx->new_data_part = ctx->data->createPart(
|
||||||
ctx->future_part->name, ctx->future_part->type, ctx->future_part->part_info, ctx->single_disk_volume, "tmp_mut_" + ctx->future_part->name);
|
ctx->future_part->name, ctx->future_part->type, ctx->future_part->part_info, ctx->single_disk_volume, "tmp_mut_" + ctx->future_part->name);
|
||||||
|
|
||||||
@ -1363,7 +1365,7 @@ bool MutateTask::prepare()
|
|||||||
&& ctx->files_to_rename.empty())
|
&& ctx->files_to_rename.empty())
|
||||||
{
|
{
|
||||||
LOG_TRACE(ctx->log, "Part {} doesn't change up to mutation version {} (optimized)", ctx->source_part->name, ctx->future_part->part_info.mutation);
|
LOG_TRACE(ctx->log, "Part {} doesn't change up to mutation version {} (optimized)", ctx->source_part->name, ctx->future_part->part_info.mutation);
|
||||||
promise.set_value(ctx->data->cloneAndLoadDataPartOnSameDisk(ctx->source_part, "tmp_clone_", ctx->future_part->part_info, ctx->metadata_snapshot, ctx->txn));
|
promise.set_value(ctx->data->cloneAndLoadDataPartOnSameDisk(ctx->source_part, "tmp_mut_", ctx->future_part->part_info, ctx->metadata_snapshot, ctx->txn));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user