Skip to content

Commit

Permalink
Address reviewer comments
Browse files Browse the repository at this point in the history
  • Loading branch information
def- committed Jan 2, 2024
1 parent f714764 commit 323a66b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
6 changes: 5 additions & 1 deletion test/cluster/blue-green-deployment/deploy.td
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
avg(l_quantity) AS avg_qty,
avg(l_extendedprice) AS avg_price,
avg(l_discount) AS avg_disc,
count(*) AS count_order
count(*) AS count_order,
'new' as state
FROM
prod_deploy.lineitem
WHERE
Expand Down Expand Up @@ -86,3 +87,6 @@

> DROP CLUSTER prod_deploy CASCADE
> DROP SCHEMA prod_deploy CASCADE

> SELECT state FROM prod.tpch_mv LIMIT 1
new
16 changes: 10 additions & 6 deletions test/cluster/blue-green-deployment/setup.td
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ ALTER SYSTEM SET enable_unmanaged_cluster_replicas = true;
COMPUTE ADDRESSES ['clusterd1:2102'],
WORKERS 1))
> CREATE CLUSTER prod_deploy REPLICAS (replica1 (
STORAGECTL ADDRESSES ['clusterd2:2100'],
STORAGE ADDRESSES ['clusterd2:2103'],
COMPUTECTL ADDRESSES ['clusterd2:2101'],
COMPUTE ADDRESSES ['clusterd2:2102'],
WORKERS 1))
STORAGECTL ADDRESSES ['clusterd2:2100', 'clusterd3:2100'],
STORAGE ADDRESSES ['clusterd2:2103', 'clusterd3:2103'],
COMPUTECTL ADDRESSES ['clusterd2:2101', 'clusterd3:2101'],
COMPUTE ADDRESSES ['clusterd2:2102', 'clusterd3:2102'],
WORKERS 2))
> DROP SCHEMA IF EXISTS prod CASCADE
> DROP SCHEMA IF EXISTS prod_deploy CASCADE

Expand All @@ -47,7 +47,8 @@ ALTER SYSTEM SET enable_unmanaged_cluster_replicas = true;
avg(l_quantity) AS avg_qty,
avg(l_extendedprice) AS avg_price,
avg(l_discount) AS avg_disc,
count(*) AS count_order
count(*) AS count_order,
'old' as state
FROM
prod.lineitem
WHERE
Expand Down Expand Up @@ -93,3 +94,6 @@ ALTER SYSTEM SET enable_unmanaged_cluster_replicas = true;
SELECT id FROM ready_dataflows
)
SELECT * FROM pending_dataflows

> SELECT state FROM prod.tpch_mv LIMIT 1
old
3 changes: 2 additions & 1 deletion test/cluster/mzcompose.py
Original file line number Diff line number Diff line change
Expand Up @@ -3022,12 +3022,13 @@ def subscribe():
c.up("materialized")
c.up("clusterd1")
c.up("clusterd2")
c.up("clusterd3")
c.run("testdrive", "blue-green-deployment/setup.td")

threads = [PropagatingThread(target=fn) for fn in (selects, subscribe)]
for thread in threads:
thread.start()
time.sleep(3) # some time to make sure the queries run fine
time.sleep(10) # some time to make sure the queries run fine
try:
c.run("testdrive", "blue-green-deployment/deploy.td")
finally:
Expand Down

0 comments on commit 323a66b

Please sign in to comment.