mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 17:41:59 +00:00
Fix: sync replicas to get consisten result
This commit is contained in:
parent
89804b831e
commit
9a788c3cac
@ -129,12 +129,6 @@ def test_parallel_replicas_over_distributed(
|
|||||||
node = nodes[0]
|
node = nodes[0]
|
||||||
expected_result = f"6003\t-1999\t1999\t3\n"
|
expected_result = f"6003\t-1999\t1999\t3\n"
|
||||||
|
|
||||||
# w/o parallel replicas
|
|
||||||
assert (
|
|
||||||
node.query(f"SELECT count(), min(key), max(key), sum(key) FROM {table_name}_d")
|
|
||||||
== expected_result
|
|
||||||
)
|
|
||||||
|
|
||||||
# parallel replicas
|
# parallel replicas
|
||||||
assert (
|
assert (
|
||||||
node.query(
|
node.query(
|
||||||
@ -148,3 +142,12 @@ def test_parallel_replicas_over_distributed(
|
|||||||
)
|
)
|
||||||
== expected_result
|
== expected_result
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# sync all replicas to get consistent result by next distributed query
|
||||||
|
node.query(f"SYSTEM SYNC REPLICA ON CLUSTER {cluster} {table_name}")
|
||||||
|
|
||||||
|
# w/o parallel replicas
|
||||||
|
assert (
|
||||||
|
node.query(f"SELECT count(), min(key), max(key), sum(key) FROM {table_name}_d")
|
||||||
|
== expected_result
|
||||||
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user