Merge pull request #46120 from azat/copier-fixes

Fix fault injection in copier and test_cluster_copier flakiness
This commit is contained in:
Alexey Milovidov 2023-02-08 08:59:17 +03:00 committed by GitHub
commit 8d4a98113c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1306,7 +1306,7 @@ TaskStatus ClusterCopier::processPartitionPieceTaskImpl(
if (!limit.empty())
query += " LIMIT " + limit;
query += "FORMAT Native";
query += " FORMAT Native";
ParserQuery p_query(query.data() + query.size());
@ -1452,7 +1452,7 @@ TaskStatus ClusterCopier::processPartitionPieceTaskImpl(
*zookeeper, host_id);
// Maybe we are the first worker
ASTPtr query_select_ast = get_select_query(split_table_for_current_piece, "count()", /*enable_splitting*/ true);
ASTPtr query_select_ast = get_select_query(split_table_for_current_piece, "count()", /* enable_splitting= */ true);
UInt64 count;
{
auto local_context = Context::createCopy(context);
@ -1520,7 +1520,7 @@ TaskStatus ClusterCopier::processPartitionPieceTaskImpl(
}
// Select all fields
ASTPtr query_select_ast = get_select_query(task_shard.table_read_shard, "*", /*enable_splitting*/ true, inject_fault ? "1" : "");
ASTPtr query_select_ast = get_select_query(task_shard.table_read_shard, "*", /* enable_splitting= */ true, inject_fault ? "1" : "");
LOG_INFO(log, "Executing SELECT query and pull from {}: {}", task_shard.getDescription(), queryToString(query_select_ast));