Explain why hostName function is used in test mutation

This commit is contained in:
nvartolomei 2022-09-20 22:41:14 +01:00 committed by GitHub
parent 3d6545cea1
commit 842b0bb44b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,6 +30,11 @@ def test_mutation_fetch_fallback(start_cluster):
node1.query("INSERT INTO fetch_fallback(k, v) VALUES (1, 3), (2, 7), (3, 4)")
node2.stop_clickhouse()
# Run a mutation using non-deterministic `hostName` function to produce
# different results on replicas and exercise the code responsible for
# discarding local mutation results and fetching "byte-identical" parts
# instead from the replica which first committed the mutation.
node1.query(
"ALTER TABLE fetch_fallback UPDATE z = hostName() WHERE 1 = 1",
settings={"mutations_sync": 1, "allow_nondeterministic_mutations": 1},