feat(db): move tables under tables directories to avoid name conflict with reserved meta files

Former-commit-id: de11db98c00ee071c8578a41c2e9ff673509fe63
This commit is contained in:
Xu Peng 2019-05-26 13:11:48 +08:00
parent 92da0fa4ca
commit 425e4b4b01

View File

@ -50,7 +50,7 @@ using ConnectorT = decltype(StoragePrototype(""));
static std::unique_ptr<ConnectorT> ConnectorPtr;
std::string DBMetaImpl::GetGroupPath(const std::string& group_id) {
return _options.path + "/" + group_id;
return _options.path + "/tables/" + group_id;
}
std::string DBMetaImpl::GetGroupDatePartitionPath(const std::string& group_id, DateT& date) {
@ -156,7 +156,7 @@ Status DBMetaImpl::add_group(GroupSchema& group_info) {
auto group_path = GetGroupPath(group_info.group_id);
if (!boost::filesystem::is_directory(group_path)) {
auto ret = boost::filesystem::create_directory(group_path);
auto ret = boost::filesystem::create_directories(group_path);
if (!ret) {
LOG(ERROR) << "Create directory " << group_path << " Error";
}