From 425e4b4b01260d4f6823084c11b6e39eefa3774e Mon Sep 17 00:00:00 2001 From: Xu Peng Date: Sun, 26 May 2019 13:11:48 +0800 Subject: [PATCH] feat(db): move tables under tables directories to avoid name conflict with reserved meta files Former-commit-id: de11db98c00ee071c8578a41c2e9ff673509fe63 --- cpp/src/db/DBMetaImpl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/src/db/DBMetaImpl.cpp b/cpp/src/db/DBMetaImpl.cpp index 825d33032b..aee1aa3f20 100644 --- a/cpp/src/db/DBMetaImpl.cpp +++ b/cpp/src/db/DBMetaImpl.cpp @@ -50,7 +50,7 @@ using ConnectorT = decltype(StoragePrototype("")); static std::unique_ptr 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"; }