Files
Raúl MarínandClaude Opus 4.8 73fa714670 Bump CLICKHOUSE_CI_MIN_TESTED_VERSION to 25.3
The minimum old release used in integration compatibility tests was 23.3.
We only support upgrading between releases at most one year apart, so raise
the floor to 25.3.

Every test pinning an older release was reviewed:

- Tests that only need some old release now use the constant
  (parallel-replicas protocol/serialization, const-node optimization, short
  strings aggregation, replicating constants, mixed-version backup/restore,
  s3Cluster/deltaLakeCluster mixed clusters). Each was checked to confirm the
  behavior it guards still ships after 25.3, so 25.3 remains a valid old node.

- Tests whose setup requires a now-unsupported release, reproducing a pre-25.3
  format or behavior that 25.3 can no longer produce, were removed: the 24.1
  TTL-move regression, the pre-24.10 query-settings-in-.sql tests, and the
  S3Queue pre-buckets metadata migration from 23.12/24.5. Where a fixture was
  shared, only the old-version test and its exclusive instance were dropped.

Converted backward-compat tests pass against current master with 25.3 as the
old node.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-19 11:48:12 +02:00

87 lines
2.6 KiB
Python

import pytest
from helpers.cluster import CLICKHOUSE_CI_MIN_TESTED_VERSION, ClickHouseCluster
cluster = ClickHouseCluster(__file__)
nodes = [
cluster.add_instance(
"node0",
main_configs=["configs/clusters.xml"],
with_zookeeper=True,
image="library/clickhouse",
tag=CLICKHOUSE_CI_MIN_TESTED_VERSION,
stay_alive=True,
with_installed_binary=True,
)
] + [
cluster.add_instance(
f"node{num + 1}",
main_configs=["configs/clusters.xml"],
with_zookeeper=True,
)
for num in range(2)
]
@pytest.fixture(scope="module")
def start_cluster():
try:
cluster.start()
yield cluster
finally:
cluster.shutdown()
def test_simple_distributed_aggregation_with_parallel_replicas(start_cluster):
for num in range(len(nodes)):
node = nodes[num]
node.query("drop table if exists t sync")
node.query(
f"""
create table if not exists t (a UInt64)
engine = ReplicatedMergeTree('/test_simple_distributed_aggregation_with_parallel_replicas/shard0/t', '{num}')
order by ()
"""
)
node.query("insert into t select number % 100000 from numbers_mt(1e7)")
node.query("optimize table t final")
# The initiator has an old version. If replicas won't recognize that fact, we will get an error like:
# "Unknown serialization kind 2: while receiving packet from node1:9000"
nodes[0].query(
"""
select sum(a)
from t
group by a
format Null
""",
settings={
"cluster_for_parallel_replicas": "parallel_replicas",
"enable_analyzer": 1,
"allow_experimental_parallel_reading_from_replicas": 1,
"max_parallel_replicas": 3,
"merge_tree_min_bytes_per_task_for_remote_reading": 1,
"max_threads": 2,
},
)
# The initiator has a newer version. It is totally fine. It only means that some replicas will send columns
# with new serialization and some other will use only the old serialization. Still let's check that it works.
nodes[2].query(
"""
select sum(a)
from t
group by a
format Null
""",
settings={
"cluster_for_parallel_replicas": "parallel_replicas",
"enable_analyzer": 1,
"allow_experimental_parallel_reading_from_replicas": 1,
"max_parallel_replicas": 3,
"merge_tree_min_bytes_per_task_for_remote_reading": 1,
"max_threads": 2,
},
)