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
Use max_query_size from context in DDLLogEntry instead of hardcoded 4096 #60083
Use max_query_size from context in DDLLogEntry instead of hardcoded 4096 #60083
Conversation
This is an automated comment for commit 4e6f04d 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
|
src/Interpreters/DDLTask.cpp
Outdated
@@ -74,6 +74,8 @@ void DDLLogEntry::setSettingsIfRequired(ContextPtr context) | |||
|
|||
if (version >= SETTINGS_IN_ZK_VERSION) | |||
settings.emplace(context->getSettingsRef().changes()); | |||
|
|||
max_query_size = context->getSettingsRef().max_query_size; |
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.
This is only called on the initiator when enqueueing a query. The purpose of this method is to save changed settings from local context to the entry and propagate them to other hosts. It will not be initialized when parsing the entry
src/Interpreters/DDLTask.cpp
Outdated
constexpr UInt64 max_depth = 16; | ||
ASTPtr settings_ast = parseQuery(parser, settings_str, max_size, max_depth); | ||
ASTPtr settings_ast = parseQuery(parser, settings_str, max_query_size, max_depth); |
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.
We can use Context::getGlobalContextInstance()->getSettingsRef().max_query_size
here
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Use max_query_size from context in parsing changed settings in DDLWorker. Previously with large number of changed settings DDLWorker could fail with
Max query size exceeded
error and don't process log entries.