Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions tests/integration/helpers/0_common_remove_cas_logs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<clickhouse>
<cas_log remove="1"/>
<cas_gc_log remove="1"/>
</clickhouse>
12 changes: 12 additions & 0 deletions tests/integration/helpers/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -2258,6 +2258,7 @@ def add_instance(
ipv4_address=None,
ipv6_address=None,
with_installed_binary=False,
installed_binary_supports_cas_logs=False,
external_dirs=None,
tmpfs=None,
mem_limit=None,
Expand Down Expand Up @@ -2290,6 +2291,8 @@ def add_instance(
with_zookeeper - if True, add ZooKeeper configuration to configs and ZooKeeper instances to the cluster.
with_zookeeper_secure - if True, add ZooKeeper Secure configuration to configs and ZooKeeper instances to the cluster.
extra_configs - config files cannot put into config.d and users.d
installed_binary_supports_cas_logs - with `with_installed_binary`, keep the `cas_log` and `cas_gc_log`
sections of the main config. The binaries of other images reject them as unknown elements.
"""

if self.is_up:
Expand Down Expand Up @@ -2406,6 +2409,7 @@ def add_instance(
ipv4_address=ipv4_address,
ipv6_address=ipv6_address,
with_installed_binary=with_installed_binary,
installed_binary_supports_cas_logs=installed_binary_supports_cas_logs,
external_dirs=external_dirs,
tmpfs=tmpfs or [],
mem_limit=mem_limit,
Expand Down Expand Up @@ -5191,6 +5195,7 @@ def __init__(
ipv4_address=None,
ipv6_address=None,
with_installed_binary=False,
installed_binary_supports_cas_logs=False,
external_dirs=None,
tmpfs=None,
mem_limit=None,
Expand Down Expand Up @@ -5365,6 +5370,7 @@ def __init__(
self.ipv4_address = ipv4_address
self.ipv6_address = ipv6_address
self.with_installed_binary = with_installed_binary
self.installed_binary_supports_cas_logs = installed_binary_supports_cas_logs
self.is_up = False
self.config_root_name = config_root_name
self.docker_init_flag = use_docker_init_flag
Expand Down Expand Up @@ -6572,6 +6578,12 @@ def write_embedded_config(name, dest_dir, fix_log_level=False):
"0_common_min_cpu_busy_time.xml", self.config_d_dir
)

# The main config comes from this checkout and has the Antalya-only `cas_log` and `cas_gc_log`
# sections. The binary of an older or upstream image rejects them as unknown elements and does not start.
# The sections stay removed if `restart_with_latest_version` later switches the instance to the tested binary.
if self.with_installed_binary and not self.installed_binary_supports_cas_logs:
write_embedded_config("0_common_remove_cas_logs.xml", self.config_d_dir)

use_old_analyzer = os.environ.get("CLICKHOUSE_USE_OLD_ANALYZER") is not None
use_distributed_plan = (
os.environ.get("CLICKHOUSE_USE_DISTRIBUTED_PLAN") is not None
Expand Down
3 changes: 3 additions & 0 deletions tests/integration/test_cas_ref_move_compat/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def start_cluster():
image="altinity/clickhouse-server",
tag=OLD_TAG,
with_installed_binary=True,
installed_binary_supports_cas_logs=True,
with_rustfs=True,
stay_alive=True,
)
Expand Down Expand Up @@ -43,6 +44,8 @@ def test_old_pool_floor_and_old_reader(start_cluster):
# Pool created by the old build (reader floor 1).
old.query("CREATE TABLE t_old (a UInt64) ENGINE = MergeTree ORDER BY a SETTINGS storage_policy = 'cas_shared'")
old.query("INSERT INTO t_old SELECT number FROM numbers(100)")
# The old build knows the CAS logs, so its instance keeps them (`installed_binary_supports_cas_logs`).
assert _count(old, "1") > 0

# The new build mounts it: the first writable mount raises the floor to 2 before any rename, so the
# new build's first rename is already an owner move. The server is stopped while the disk config lands:
Expand Down
Loading