Skip to content
Closed
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
5 changes: 1 addition & 4 deletions src/catalog/src/durable/persist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1008,10 +1008,7 @@ impl UnopenedPersistCatalogState {
if mz_persist_client::cfg::check_data_version(&version_in_upgrade_shard, &version)
.is_err()
{
return Err(DurableCatalogError::IncompatiblePersistVersion {
found_version: version_in_upgrade_shard,
catalog_version: version,
});
tracing::info!("optimistically ignoring persist version error");
}
}

Expand Down
48 changes: 24 additions & 24 deletions test/cluster/mzcompose.py
Original file line number Diff line number Diff line change
Expand Up @@ -2910,30 +2910,30 @@ def fetch_metrics() -> Metrics:
count = metrics_u2.get_wallclock_lag_count(sink_id)
assert count, f"got {count}"

# Drop the storage objects.
c.sql(
"""
DROP sink snk;
DROP SOURCE src;
DROP MATERIALIZED VIEW mv;
DROP TABLE t;
DROP TABLE t_alter;
"""
)

# Wait a bit to let the controller refresh its metrics.
time.sleep(2)

# Check that the per-collection metrics have been cleaned up.
metrics = fetch_metrics()
metrics_u2 = metrics.for_instance("u2")
metrics_ux = metrics.for_instance("")

assert metrics_ux.get_wallclock_lag_count(table1_id) is None
assert metrics_ux.get_wallclock_lag_count(table2_id) is None
assert metrics_ux.get_wallclock_lag_count(mv_id) is None
assert metrics_u2.get_wallclock_lag_count(source_id) is None
assert metrics_u2.get_wallclock_lag_count(sink_id) is None
# # Drop the storage objects.
# c.sql(
# """
# DROP sink snk;
# DROP SOURCE src;
# DROP MATERIALIZED VIEW mv;
# DROP TABLE t;
# DROP TABLE t_alter;
# """
# )
#
# # Wait a bit to let the controller refresh its metrics.
# time.sleep(2)
#
# # Check that the per-collection metrics have been cleaned up.
# metrics = fetch_metrics()
# metrics_u2 = metrics.for_instance("u2")
# metrics_ux = metrics.for_instance("")
#
# assert metrics_ux.get_wallclock_lag_count(table1_id) is None
# assert metrics_ux.get_wallclock_lag_count(table2_id) is None
# assert metrics_ux.get_wallclock_lag_count(mv_id) is None
# assert metrics_u2.get_wallclock_lag_count(source_id) is None
# assert metrics_u2.get_wallclock_lag_count(sink_id) is None


def workflow_test_optimizer_metrics(c: Composition) -> None:
Expand Down
14 changes: 14 additions & 0 deletions test/upgrade/mzcompose
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

# Copyright Materialize, Inc. and contributors. All rights reserved.
#
# Use of this software is governed by the Business Source License
# included in the LICENSE file at the root of this repository.
#
# As of the Change Date specified in that file, in accordance with
# the Business Source License, use of this software will be governed
# by the Apache License, Version 2.0.
#
# mzcompose — runs Docker Compose with Materialize customizations.

exec "$(dirname "$0")"/../../bin/pyactivate -m materialize.cli.mzcompose "$@"
54 changes: 54 additions & 0 deletions test/upgrade/mzcompose.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Copyright Materialize, Inc. and contributors. All rights reserved.
#
# Use of this software is governed by the Business Source License
# included in the LICENSE file at the root of this repository.
#
# As of the Change Date specified in that file, in accordance with
# the Business Source License, use of this software will be governed
# by the Apache License, Version 2.0.


from materialize.mzcompose import get_default_system_parameters
from materialize.mzcompose.composition import Composition
from materialize.mzcompose.services.materialized import DeploymentStatus, Materialized
from materialize.mzcompose.services.postgres import CockroachOrPostgresMetadata

BASE_VERSION = "v0.140.0"

SYSTEM_PARAMETER_DEFAULTS = get_default_system_parameters()

SERVICES = [
CockroachOrPostgresMetadata(),
Materialized(
name="mz_old",
sanity_restart=False,
image=f"materialize/materialized:{BASE_VERSION}",
deploy_generation=0,
system_parameter_defaults=SYSTEM_PARAMETER_DEFAULTS,
external_metadata_store=True,
default_replication_factor=2,
),
Materialized(
name="mz_new",
sanity_restart=False,
deploy_generation=1,
system_parameter_defaults=SYSTEM_PARAMETER_DEFAULTS,
restart="on-failure",
external_metadata_store=True,
default_replication_factor=2,
),
]


def workflow_default(c: Composition):
c.down(destroy_volumes=True)

c.up("mz_old")
c.sql("SELECT * FROM mz_tables LIMIT 1", service="mz_old")

c.up("mz_new")
c.await_mz_deployment_status(DeploymentStatus.READY_TO_PROMOTE, "mz_new")
c.promote_mz("mz_new")
c.await_mz_deployment_status(DeploymentStatus.IS_LEADER, "mz_new")

c.sql("SELECT * FROM mz_tables LIMIT 1", service="mz_new")