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 starting the server with tables having default expressions containing dictGet() #19805
Fix starting the server with tables having default expressions containing dictGet() #19805
Conversation
@@ -140,6 +149,7 @@ class FunctionDictHelper | |||
const ExternalDictionariesLoader & external_loader; | |||
/// Access cannot be not granted, since in this case checkAccess() will throw and access_checked will not be updated. | |||
std::atomic<bool> access_checked = false; | |||
std::unique_ptr<DictionaryStructure> structure_holder; |
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.
It seems like there can be a race condition, because this helper is used in IFunction getReturnType, and this getReturnType can be called from multiple threads.
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.
Yes, you're right. Actually we can't use that kind of caching here at all due to #16205. I've changed the code.
auto dictionary = helper.getDictionary(dictionary_name); | ||
|
||
return helper.getDictionaryAttribute(dictionary, attribute_name).type; | ||
return helper.getDictionaryAttribute(dictionary_name, attribute_name).type; |
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.
Please remove TODO at line 280.
/// TODO: We can load only dictionary structure
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.
done
29b317c
to
2a90b1b
Compare
2a90b1b
to
2741f81
Compare
Closes #13613 |
Also #13059 and maybe more. |
…ns containing dictGet(). Allow getting return type of dictGet() without loading dictionary.
abfaf3a
to
95177dc
Compare
195d4ad
to
cbd4bac
Compare
../src/AggregateFunctions/ReservoirSamplerDeterministic.h:59:
|
…efault expressions containing dictGet()
Backport #19805 to 21.2: Fix starting the server with tables having default expressions containing dictGet()
…efault expressions containing dictGet()
…default expressions containing dictGet()
…default expressions containing dictGet()
…efault expressions containing dictGet()
…default expressions containing dictGet()
…default expressions containing dictGet()
Backport #19805 to 20.12: Fix starting the server with tables having default expressions containing dictGet()
Backport #19805 to 21.1: Fix starting the server with tables having default expressions containing dictGet()
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
Changelog category:
Changelog entry:
Fix starting the server with tables having default expressions containing dictGet().
Allow getting return type of dictGet() without loading dictionary.