mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Fix test_system_merges by using mutations_sync=1
After early_constant_folding started to ignore not only ignore(), but all functions with isSuitableForConstantFolding() == false, there became more sleep(2) calls for this test: - MergeTreeDataSelectExecutor::readFromParts -> DB::KeyCondition::KeyCondition - MergeTreeDataMergerMutator::mutatePartToTemporaryPart -> DB::isStorageTouchedByMutations -> FilterTransform::transform - MergeTreeDataMergerMutator::mutatePartToTemporaryPart -> DB::MergeTreeDataMergerMutator::mutateAllPartColumns -> FilterTransform::transform While before it was optimized to 0 during WHERE analysis.
This commit is contained in:
parent
222a0db3f4
commit
3993ad6f01
@ -134,7 +134,9 @@ def test_mutation_simple(started_cluster, replicated):
|
|||||||
result_part = "all_{}_{}_0_{}".format(starting_block, starting_block, starting_block + 1)
|
result_part = "all_{}_{}_0_{}".format(starting_block, starting_block, starting_block + 1)
|
||||||
|
|
||||||
def alter():
|
def alter():
|
||||||
node1.query("ALTER TABLE {name} UPDATE a = 42 WHERE sleep(2) OR 1".format(name=name))
|
node1.query("ALTER TABLE {name} UPDATE a = 42 WHERE sleep(2) OR 1".format(name=name), settings={
|
||||||
|
'mutations_sync': 1,
|
||||||
|
})
|
||||||
|
|
||||||
t = threading.Thread(target=alter)
|
t = threading.Thread(target=alter)
|
||||||
t.start()
|
t.start()
|
||||||
@ -159,8 +161,6 @@ def test_mutation_simple(started_cluster, replicated):
|
|||||||
]
|
]
|
||||||
t.join()
|
t.join()
|
||||||
|
|
||||||
time.sleep(1.5)
|
|
||||||
|
|
||||||
assert node_check.query("SELECT * FROM system.merges WHERE table = '{name}'".format(name=table_name)) == ""
|
assert node_check.query("SELECT * FROM system.merges WHERE table = '{name}'".format(name=table_name)) == ""
|
||||||
|
|
||||||
finally:
|
finally:
|
||||||
|
Loading…
Reference in New Issue
Block a user