Merge pull request #45744 from ClickHouse/fix-style-and-typo

Fix style and typo
This commit is contained in:
Alexey Milovidov 2023-01-29 19:40:32 +03:00 committed by GitHub
commit 303fc4b863
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 6 deletions

View File

@ -49,8 +49,8 @@ Chunk ParquetBlockInputFormat::generate()
if (is_stopped)
return {};
for (; row_group_current < row_group_total && skip_row_groups.contains(row_group_current); ++row_group_current)
;
while (row_group_current < row_group_total && skip_row_groups.contains(row_group_current))
++row_group_current;
if (row_group_current >= row_group_total)
return res;
@ -79,6 +79,7 @@ Chunk ParquetBlockInputFormat::generate()
if (format_settings.defaults_for_omitted_fields)
for (const auto & column_idx : missing_columns)
block_missing_values.setBits(column_idx, res.getNumRows());
return res;
}

View File

@ -1856,7 +1856,7 @@ size_t MergeTreeData::clearOldTemporaryDirectories(size_t custom_directories_lif
size_t cleared_count = 0;
/// Delete temporary directories older than a day.
/// Delete temporary directories older than a the specified age.
for (const auto & disk : getDisks())
{
if (disk->isBroken())

View File

@ -1,12 +1,11 @@
#!/usr/bin/env bash
# Tags: replica, no-parallel, no-fasttest
# This test checks mutations concurrent execution with concurrent inserts.
# There was a bug in mutations finalization, when mutation finishes not after all
# MUTATE_PART tasks execution, but after GET of already mutated part from other replica.
# To test it we stop some replicas to delay fetch of required parts for mutation.
# Since our replication queue executing tasks concurrently it may happen, that we dowload already mutated
# Since our replication queue executing tasks concurrently it may happen, that we download already mutated
# part before source part.
@ -21,7 +20,16 @@ for i in $(seq $REPLICAS); do
done
for i in $(seq $REPLICAS); do
$CLICKHOUSE_CLIENT --query "CREATE TABLE concurrent_mutate_mt_$i (key UInt64, value1 UInt64, value2 String) ENGINE = ReplicatedMergeTree('/clickhouse/tables/$CLICKHOUSE_TEST_ZOOKEEPER_PREFIX/concurrent_mutate_mt', '$i') ORDER BY key SETTINGS max_replicated_mutations_in_queue=1000, number_of_free_entries_in_pool_to_execute_mutation=0,max_replicated_merges_in_queue=1000,temporary_directories_lifetime=10,cleanup_delay_period=3,cleanup_delay_period_random_add=0"
$CLICKHOUSE_CLIENT --query "
CREATE TABLE concurrent_mutate_mt_$i (key UInt64, value1 UInt64, value2 String)
ENGINE = ReplicatedMergeTree('/clickhouse/tables/$CLICKHOUSE_TEST_ZOOKEEPER_PREFIX/concurrent_mutate_mt', '$i')
ORDER BY key
SETTINGS max_replicated_mutations_in_queue = 1000,
number_of_free_entries_in_pool_to_execute_mutation = 0,
max_replicated_merges_in_queue = 1000,
temporary_directories_lifetime = 10,
cleanup_delay_period = 3,
cleanup_delay_period_random_add = 0"
done
$CLICKHOUSE_CLIENT --query "INSERT INTO concurrent_mutate_mt_1 SELECT number, number + 10, toString(number) from numbers(10)"