Skip mutations of unrelated partitions in StorageMergeTree#21326
Skip mutations of unrelated partitions in StorageMergeTree#21326alesapin merged 16 commits intoClickHouse:masterfrom
StorageMergeTree#21326Conversation
StorageMergeTree.StorageMergeTree
src/Storages/StorageMergeTree.h
Outdated
There was a problem hiding this comment.
Is this a problem? I mean why it tagged with FIXME?
There was a problem hiding this comment.
This is no longer a problem.
There was a problem hiding this comment.
Worth checking system.parts to verify that parts wasn't cloned?
And also block_numbers.number/parts_to_do_names from the system.mutations?
src/Storages/StorageMergeTree.cpp
Outdated
There was a problem hiding this comment.
Why this is required? Ok, I see, but worth a comment (and also describe why it should not be persistent on disk)
There was a problem hiding this comment.
BTW worth adding a test for ReplicatedMergeTree?
|
Also with this patch the mutations will hang for non existing parts (since it will return nothing from selectPartsToMutate() and so nothing will be notified), i.e.: CREATE TABLE test_mutations_in_partitions
(
`date` Date,
`a` UInt64,
`b` String
)
ENGINE = MergeTree
PARTITION BY a
ORDER BY tuple();
INSERT INTO test_mutations_in_partitions SELECT
'2019-07-29' AS date,
number,
toString(number)
FROM numbers(100);
ALTER TABLE test_mutations_in_partitions
DELETE IN PARTITION 1000 WHERE 1
SETTINGS mutations_sync = 1;
Query id: cc447d87-d3df-4c9d-a53a-c3f58ea69a49
Timeout exceeded while receiving data from server. Waited for 300 seconds, timeout is 300 seconds.
Cancelling query. |
There was a problem hiding this comment.
BTW how about adding simple stateless test instead of integration test?
For mutations_sync it can be even .sql file, while for non-sync it can be .sh
src/Storages/StorageMergeTree.cpp
Outdated
There was a problem hiding this comment.
Also this place looks a little bit unsafe, maybe it worth moving commands into the for loop scope?
b2851fa to
0064b91
Compare
d5a44c8 to
dbbe1bc
Compare
df5e6ef to
c7978d2
Compare
StorageMergeTreeStorageMergeTree
StorageMergeTreeStorageMergeTree
src/Storages/StorageMergeTree.cpp
Outdated
There was a problem hiding this comment.
Maybe this triggering can this be done unconditionally?
Since if some parts was affected then it will not hit this section anyway, right?
There was a problem hiding this comment.
I intentionally made that in order to not degrade performance on mutex each merge attempt for those who don't use this feature (who mutate always all data). Do you think it worth making unconditionally?
c7978d2 to
a65cb38
Compare
a65cb38 to
121dada
Compare
|
Why did you send it to draft? |
121dada to
8472eb5
Compare
8472eb5 to
feafbd4
Compare
|
Hi @azat. Can you approve a PR? |
|
@Mergifyio update |
|
@azat is not allowed to run commands |
|
@excitoon I will take a look during this weak, in the mean time can you rebase the PR against master? (There are lots of tests failures, yes they seems unrelated, since server got KILLed, but checks should be passed before someone will merge it I guess) P.S. Also I can't download binary since none of builds had been finished (even fasttest). |
|
@Mergifyio update |
❌ Pull request can't be updated with latest base branch changesDetailsMergify needs the author permission to update the base branch of the pull request. |
4128aad to
6b0b2b9
Compare
|
@alesapin Can you please look at it? |
6350a9f to
a893f05
Compare
7cd6430 to
100e61a
Compare
|
Ok, let's merge. |
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Skipping mutations of different partitions in
StorageMergeTree.