This commit is contained in:
Han Fei 2023-09-29 18:20:16 +02:00
parent e57217ea9c
commit 8afc21f7af

View File

@ -321,11 +321,12 @@ void ReplicatedMergeTreeSinkImpl<async_insert>::consume(Chunk chunk)
if constexpr (async_insert) if constexpr (async_insert)
{ {
block_id = AsyncInsertBlockInfo::getHashesForBlocks(unmerged_block ? *unmerged_block : current_block, temp_part.part->info.partition_id); auto get_block_id = [&](BlockWithPartition & block_)
if (unmerged_block) {
LOG_TRACE(log, "async insert part, part id {}, block id {}, offsets {}, size {}", temp_part.part->info.partition_id, toString(block_id), toString(unmerged_block->offsets), unmerged_block->offsets.size()); block_id = AsyncInsertBlockInfo::getHashesForBlocks(block_, temp_part.part->info.partition_id);
else LOG_TRACE(log, "async insert part, part id {}, block id {}, offsets {}, size {}", temp_part.part->info.partition_id, toString(block_id), toString(block_.offsets), block_.offsets.size());
LOG_TRACE(log, "async insert part, part id {}, block id {}, offsets {}, size {}", temp_part.part->info.partition_id, toString(block_id), toString(current_block.offsets), current_block.offsets.size()); };
get_block_id(unmerged_block ? *unmerged_block : current_block);
} }
else else
{ {