Update ReplicatedMergeTreeSink.cpp

This commit is contained in:
Alexander Tokmakov 2023-10-30 15:43:48 +01:00 committed by GitHub
parent e07bb123d3
commit ae8d7a557b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -928,8 +928,13 @@ std::pair<std::vector<String>, bool> ReplicatedMergeTreeSinkImpl<async_insert>::
}
else if (multi_code == Coordination::Error::ZNONODE && zkutil::getFailedOpIndex(multi_code, responses) == block_unlock_op_idx)
{
if (block_number_lock)
throw Exception(ErrorCodes::QUERY_WAS_CANCELLED,
"Insert query (for block {}) was canceled by concurrent ALTER PARTITION or TRUNCATE", block_number_lock->getPath());
chassert(!existing_part_name.empty());
throw Exception(ErrorCodes::QUERY_WAS_CANCELLED,
"Insert query (for block {}) was cancelled by concurrent ALTER PARTITION", block_number_lock->getPath());
"Insert query (for existing part {}, deduplicated) was canceled by concurrent ALTER PARTITION, TRUNCATE, or the part became outdated", existing_part_name);
}
else if (Coordination::isHardwareError(multi_code))
{