Skip to content

Commit e6180de

Browse files
committed
ignore_error_distributed_ddl_queue: ignore only syntax errors
1 parent af58fa5 commit e6180de

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

src/Storages/System/StorageSystemDDLWorkerQueue.cpp

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ namespace Setting
2929
extern const SettingsUInt64 max_query_size;
3030
}
3131

32+
namespace ErrorCodes
33+
{
34+
extern const int SYNTAX_ERROR;
35+
}
36+
3237
enum class Status : uint8_t
3338
{
3439
INACTIVE,
@@ -92,11 +97,15 @@ static String clusterNameFromDDLQuery(ContextPtr context, const DDLTask & task)
9297
query = parseQuery(
9398
parser_query, begin, end, description, settings[Setting::max_query_size], settings[Setting::max_parser_depth], settings[Setting::max_parser_backtracks]);
9499
}
95-
catch (const Exception &)
100+
catch (const Exception & e)
96101
{
97-
/// Best effort - ignore parse error and present available information
98102
LOG_INFO(getLogger("StorageSystemDDLWorkerQueue"), "Failed to determine cluster");
99-
return "";
103+
if (e.code() == ErrorCodes::SYNTAX_ERROR)
104+
{
105+
/// ignore parse error and present available information
106+
return "";
107+
}
108+
throw;
100109
}
101110

102111
String cluster_name;

0 commit comments

Comments
 (0)