-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
Allow to write ClickHouse text logs into system table. #6103
Allow to write ClickHouse text logs into system table. #6103
Conversation
Please add some lines to server config to create system.text_log table. |
dbms/src/Interpreters/TextLog.cpp
Outdated
auto priority_datatype = std::make_shared<DataTypeEnum8>( | ||
DataTypeEnum8::Values | ||
{ | ||
{"FATAL", static_cast<Int8>(Message::PRIO_FATAL)}, |
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.
I prefer Fatal
not FATAL
, like in text log itself.
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.
Fixed
…ClickHouse into nikitamikhaylov-system_text_log
Please pull changes from my branch: #6164 TODO:
|
What are the changes from your branch aimed at? I’ve already solved the problem with text_log setting in server’s config. |
Also please add |
95705dc
to
b21c89b
Compare
{ | ||
auto lock = getLock(); | ||
|
||
if (!shared->system_logs) |
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.
?
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 is written for SYSTEM FLUSH LOGS functionality. Because it requires all system logs as Context’s field.
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.
Null pointer dereference.
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.
ohh, yes..
If the code is really awful, maybe I should rewrite It with separate complex singleton? |
|
||
${CLICKHOUSE_CLIENT} --query="SELECT 6103" | ||
|
||
for (( i=1; i <= 50; i++ )) |
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.
What for 50 retries here with 0.1 delay, if there is system flush logs
? AFAICS system flush logs
is sync
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.
Because there are too many buffers. Do you have any problems with this test?
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.
Because there are too many buffers.
Sorry don't get it, what buffers?
Do you have any problems with this test?
Not really (in case of failure it can take pretty long, but that was due to my changes so not a problem)
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
Category (leave one):
Short description (up to few sentences):
Now text logs saved in system table.
To enable, add
in
config.xml
.#6037