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
Don't mark a part as broken on Poco::TimeoutException
#50811
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -99,6 +99,7 @@ | |||||||||||||||||||||||||
|
||||||||||||||||||||||||||
#include <fmt/format.h> | ||||||||||||||||||||||||||
#include <Poco/Logger.h> | ||||||||||||||||||||||||||
#include <Poco/Net/NetException.h> | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
template <> | ||||||||||||||||||||||||||
struct fmt::formatter<DB::DataPartPtr> : fmt::formatter<std::string> | ||||||||||||||||||||||||||
|
@@ -1252,6 +1253,14 @@ MergeTreeData::LoadPartResult MergeTreeData::loadDataPart( | |||||||||||||||||||||||||
mark_broken(); | ||||||||||||||||||||||||||
return res; | ||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||
catch (const Poco::Net::NetException &) | ||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||
throw; | ||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||
catch (const Poco::TimeoutException &) | ||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||
throw; | ||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||
catch (...) | ||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||
mark_broken(); | ||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks dangerous - why don't explicitly list the exceptions leading to broken parts? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For example, what about the "memory limit exceeded" exception? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yes, but it always worked this way. It's not that dangerous because it's easy to attach broken parts back
I guess because we don't really know what exceptions lead to broken parts. Just like we don't know what exceptions are retriable.
ClickHouse/src/Storages/MergeTree/MergeTreeData.cpp Lines 1245 to 1252 in eb698a7
ClickHouse/src/Storages/MergeTree/MergeTreeData.cpp Lines 1172 to 1175 in eb698a7
|
||||||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. What about NetException?