-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix possible intersecting parts for MergeTree (after moving to detached failed) #70476
Fix possible intersecting parts for MergeTree (after moving to detached failed) #70476
Conversation
This is an automated comment for commit 50fc035 with description of existing statuses. It's updated for the latest CI running ❌ Click here to open a full report in a separate page
Successful checks
|
|
Can someone take a look please? |
Kind ping |
cffc891
to
f51050d
Compare
Kind ping |
@tavplubix maybe you can take a look? |
86b883b
to
498389a
Compare
CI:
Rebased |
498389a
to
39b32a2
Compare
…from common code) It could happen for MergeTree as well. Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
MergeTree is fragile in this case, since the source of truth for it is the filesystem and it will be left in an inconsistent state. Image the following: - during startup you got some broken part, that should be moved to detached - this rename throws exception (i.e. permission error) - but this error is ignored, server continues, and tries to merge something that produces intersecting parts for that broken part - later on restart you will got intersecting parts (since at the time of scanning for intersecting parts, the part is not checked) Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com> Co-authored-by: Alexander Tokmakov <tavplubix@clickhouse.com>
… detached Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
Rebased
Hope will be fixed as well |
39b32a2
to
50fc035
Compare
Apparently it requires some manual intervention |
Yes. Please do not force push to restart the CI. The reason I didn't merge it is not some flaky tests. The reason is that I had to resolve a conflict in "CH Inc sync", but every force push resets it :) |
551605a
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fix possible intersecting parts for MergeTree (after moving to detached failed)
MergeTree is fragile in this case, since the source of truth for it is
the filesystem and it will be left in an inconsistent state.
Image the following:
detached
something that produces intersecting parts for that broken part
scanning for intersecting parts, the part is not checked)
So the error should not be ignored.
Also adjust the error message slightly (remove ZooKeeper mention) and ignore only ErrnoException/std::filesystem::filesystem_error.
Initially introduced in: #13544 (cc @amosbird)