Skip to content
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

max_suspicious_broken_parts = 10 (default) is too low #41423

Closed
den-crane opened this issue Sep 16, 2022 · 2 comments · Fixed by #41619
Closed

max_suspicious_broken_parts = 10 (default) is too low #41423

den-crane opened this issue Sep 16, 2022 · 2 comments · Fixed by #41619
Labels

Comments

@den-crane
Copy link
Contributor

den-crane commented Sep 16, 2022

We often see complaints about startup issue Suspiciously many (12 parts, 0.00 B in total) broken parts to remove while maximum allowed broken parts count is 10 and in 100% cases it's because of an unexpected restart and files with 0 size or parts without half of files. The maximum number that I saw in public chats or from Altinity clients is 70 broken parts.

(it seems the modern hardware (ssd) + arbitrary partitioning allow to create a more parts per second than it was in 2016 when max_suspicious_broken_parts = 10 was good enough)

Personally I set max_suspicious_broken_parts = 100.

So my proposal is to increase the default to 100 or at least to 50.

@den-crane den-crane changed the title max_suspicious_broken_parts = 10 (default is too low) max_suspicious_broken_parts = 10 (default) is too low Sep 16, 2022
@UnamedRus
Copy link
Contributor

I think, it's happens quite often with really small test/tmp tables.

May be we should have another threshold about size in bytes for broken parts?

@den-crane
Copy link
Contributor Author

den-crane commented Sep 16, 2022

@UnamedRus

SELECT *
FROM system.merge_tree_settings
WHERE name LIKE '%max_suspicious_broken_parts%'

┌─name──────────────────────────────┬─value──────┬─changed─┬─description──────────────────────────────────────────────────────┬─type───┐
│ max_suspicious_broken_parts       │ 10         │       0 │ Max broken parts, if more - deny automatic deletion.             │ UInt64 │
│ max_suspicious_broken_parts_bytes │ 1073741824 │       0 │ Max size of all broken parts, if more - deny automatic deletion. │ UInt64 │
└───────────────────────────────────┴────────────┴─────────┴──────────────────────────────────────────────────────────────────┴────────┘

I think the issue you're thinking happens because of replicated_max_ratio_of_wrong_parts

SELECT *
FROM system.merge_tree_settings
WHERE name LIKE '%replicated_max_ratio_of_wrong_parts%'

┌─name────────────────────────────────┬─value─┬─changed─┬─description──────────────────────────────────────────────────────────────────────────┬─type──┐
│ replicated_max_ratio_of_wrong_parts │ 0.5   │       0 │ If ratio of wrong parts to total number of parts is less than this - allow to start. │ Float │
└─────────────────────────────────────┴───────┴─────────┴──────────────────────────────────────────────────────────────────────────────────────┴───────┘

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants