-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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 wrong data path in DatabaseMemory #8753
Conversation
dbms/src/Storages/StorageFactory.cpp
Outdated
@@ -132,6 +132,12 @@ StoragePtr StorageFactory::get( | |||
} | |||
} | |||
|
|||
if (relative_data_path.empty()) | |||
{ | |||
if (endsWith(name, "MergeTree") || endsWith(name, "Log") || name == "Join" || name == "Set") |
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.
If it means "all table engines that store data on disk", I would add Distributed
,
but better to just remove that if,
because if relative path is empty, it is logical error anyway?
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.
Distributed
and File
can be created with empty path
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.
Let's add a virtual method to IStorage?
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.
Or, better - check for nonempty path in storages constructor?
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 and one question remains.
…ta_path Fix wrong data path in DatabaseMemory
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
Changelog category (leave one):
Changelog entry (up to few sentences, required except for Non-significant/Documentation categories):
In 20.1.1
Memory
databases use empty data path, so tables are created inpath
directory (e.g./var/lib/clickhouse/
), not in data directory of database (e.g./var/lib/clickhouse/db_name
).