This commit is contained in:
Alexander Tokmakov 2023-06-15 15:05:17 +02:00
parent a018d9ca11
commit dc0a224f52
7 changed files with 42 additions and 5 deletions

View File

@ -1917,7 +1917,7 @@ try
++num_loaded_parts; ++num_loaded_parts;
if (res.is_broken) if (res.is_broken)
{ {
forcefullyRemoveBrokenOutdatedPartFromZooKeeperBeforeDetaching(part->name); forcefullyRemoveBrokenOutdatedPartFromZooKeeperBeforeDetaching(res.part->name);
res.part->renameToDetached("broken-on-start"); /// detached parts must not have '_' in prefixes res.part->renameToDetached("broken-on-start"); /// detached parts must not have '_' in prefixes
} }
else if (res.part->is_duplicate) else if (res.part->is_duplicate)

View File

@ -0,0 +1,4 @@
<clickhouse>
<replicated_merge_tree_paranoid_check_on_drop_range>0</replicated_merge_tree_paranoid_check_on_drop_range>
<replicated_merge_tree_paranoid_check_on_startup>0</replicated_merge_tree_paranoid_check_on_startup>
</clickhouse>

View File

@ -6,7 +6,14 @@ from helpers.cluster import ClickHouseCluster
cluster = ClickHouseCluster(__file__) cluster = ClickHouseCluster(__file__)
node1 = cluster.add_instance("node1", with_zookeeper=True, stay_alive=True) node1 = cluster.add_instance("node1", with_zookeeper=True, stay_alive=True)
node2 = cluster.add_instance("node2", with_zookeeper=True, stay_alive=True) node2 = cluster.add_instance(
"node2",
with_zookeeper=True,
stay_alive=True,
main_configs=[
"configs/compat.xml",
],
)
@pytest.fixture(scope="module") @pytest.fixture(scope="module")

View File

@ -0,0 +1,4 @@
<clickhouse>
<replicated_merge_tree_paranoid_check_on_drop_range>0</replicated_merge_tree_paranoid_check_on_drop_range>
<replicated_merge_tree_paranoid_check_on_startup>0</replicated_merge_tree_paranoid_check_on_startup>
</clickhouse>

View File

@ -19,6 +19,9 @@ node4 = cluster.add_instance(
tag="20.12.4.5", tag="20.12.4.5",
stay_alive=True, stay_alive=True,
with_installed_binary=True, with_installed_binary=True,
main_configs=[
"configs/compat.xml",
],
) )
node5 = cluster.add_instance( node5 = cluster.add_instance(
@ -28,6 +31,9 @@ node5 = cluster.add_instance(
tag="20.12.4.5", tag="20.12.4.5",
stay_alive=True, stay_alive=True,
with_installed_binary=True, with_installed_binary=True,
main_configs=[
"configs/compat.xml",
],
) )
node6 = cluster.add_instance( node6 = cluster.add_instance(
"node6", "node6",
@ -36,6 +42,9 @@ node6 = cluster.add_instance(
tag="20.12.4.5", tag="20.12.4.5",
stay_alive=True, stay_alive=True,
with_installed_binary=True, with_installed_binary=True,
main_configs=[
"configs/compat.xml",
],
) )
@ -517,7 +526,7 @@ def test_ttl_compatibility(started_cluster, node_left, node_right, num_run):
ENGINE = ReplicatedMergeTree('/clickhouse/tables/test/test_ttl_delete_{suff}', '{replica}') ENGINE = ReplicatedMergeTree('/clickhouse/tables/test/test_ttl_delete_{suff}', '{replica}')
ORDER BY id PARTITION BY toDayOfMonth(date) ORDER BY id PARTITION BY toDayOfMonth(date)
TTL date + INTERVAL 3 SECOND TTL date + INTERVAL 3 SECOND
SETTINGS max_number_of_merges_with_ttl_in_pool=100, max_replicated_merges_with_ttl_in_queue=100, remove_empty_parts=0 SETTINGS max_number_of_merges_with_ttl_in_pool=100, max_replicated_merges_with_ttl_in_queue=100
""".format( """.format(
suff=num_run, replica=node.name suff=num_run, replica=node.name
) )
@ -529,7 +538,7 @@ def test_ttl_compatibility(started_cluster, node_left, node_right, num_run):
ENGINE = ReplicatedMergeTree('/clickhouse/tables/test/test_ttl_group_by_{suff}', '{replica}') ENGINE = ReplicatedMergeTree('/clickhouse/tables/test/test_ttl_group_by_{suff}', '{replica}')
ORDER BY id PARTITION BY toDayOfMonth(date) ORDER BY id PARTITION BY toDayOfMonth(date)
TTL date + INTERVAL 3 SECOND GROUP BY id SET val = sum(val) TTL date + INTERVAL 3 SECOND GROUP BY id SET val = sum(val)
SETTINGS max_number_of_merges_with_ttl_in_pool=100, max_replicated_merges_with_ttl_in_queue=100, remove_empty_parts=0 SETTINGS max_number_of_merges_with_ttl_in_pool=100, max_replicated_merges_with_ttl_in_queue=100
""".format( """.format(
suff=num_run, replica=node.name suff=num_run, replica=node.name
) )
@ -541,7 +550,7 @@ def test_ttl_compatibility(started_cluster, node_left, node_right, num_run):
ENGINE = ReplicatedMergeTree('/clickhouse/tables/test/test_ttl_where_{suff}', '{replica}') ENGINE = ReplicatedMergeTree('/clickhouse/tables/test/test_ttl_where_{suff}', '{replica}')
ORDER BY id PARTITION BY toDayOfMonth(date) ORDER BY id PARTITION BY toDayOfMonth(date)
TTL date + INTERVAL 3 SECOND DELETE WHERE id % 2 = 1 TTL date + INTERVAL 3 SECOND DELETE WHERE id % 2 = 1
SETTINGS max_number_of_merges_with_ttl_in_pool=100, max_replicated_merges_with_ttl_in_queue=100, remove_empty_parts=0 SETTINGS max_number_of_merges_with_ttl_in_pool=100, max_replicated_merges_with_ttl_in_queue=100
""".format( """.format(
suff=num_run, replica=node.name suff=num_run, replica=node.name
) )

View File

@ -0,0 +1,4 @@
<clickhouse>
<replicated_merge_tree_paranoid_check_on_drop_range>0</replicated_merge_tree_paranoid_check_on_drop_range>
<replicated_merge_tree_paranoid_check_on_startup>0</replicated_merge_tree_paranoid_check_on_startup>
</clickhouse>

View File

@ -13,6 +13,9 @@ node1 = cluster.add_instance(
tag="20.4.9.110", tag="20.4.9.110",
with_installed_binary=True, with_installed_binary=True,
stay_alive=True, stay_alive=True,
main_configs=[
"configs/compat.xml",
],
) )
node2 = cluster.add_instance( node2 = cluster.add_instance(
"node2", "node2",
@ -21,6 +24,9 @@ node2 = cluster.add_instance(
tag="20.4.9.110", tag="20.4.9.110",
with_installed_binary=True, with_installed_binary=True,
stay_alive=True, stay_alive=True,
main_configs=[
"configs/compat.xml",
],
) )
node3 = cluster.add_instance( node3 = cluster.add_instance(
"node3", "node3",
@ -29,6 +35,9 @@ node3 = cluster.add_instance(
tag="20.4.9.110", tag="20.4.9.110",
with_installed_binary=True, with_installed_binary=True,
stay_alive=True, stay_alive=True,
main_configs=[
"configs/compat.xml",
],
) )