提交 3b909197 编写于 作者: P peng.xu

feat(db): fix build bug


Former-commit-id: ccaea7bc9f6f281f0f973ad1de7b5fa73d693c70
上级 303d600e
......@@ -497,7 +497,7 @@ Status DBImpl::BuildIndex(const meta::TableFileSchema& file) {
}
Status DBImpl::BuildIndexByTable(const std::string& table_id) {
std::unique_ptr<std::mutex> lock(build_index_mutex_);
std::unique_lock<std::mutex> lock(build_index_mutex_);
meta::TableFilesSchema to_index_files;
meta_ptr_->FilesToIndex(to_index_files);
......@@ -516,7 +516,7 @@ Status DBImpl::BuildIndexByTable(const std::string& table_id) {
}
void DBImpl::BackgroundBuildIndex() {
std::unique_ptr<std::mutex> lock(build_index_mutex_);
std::unique_lock<std::mutex> lock(build_index_mutex_);
meta::TableFilesSchema to_index_files;
meta_ptr_->FilesToIndex(to_index_files);
Status status;
......
......@@ -113,7 +113,7 @@ class DBImpl : public DB {
void BackgroundBuildIndex();
Status
BuildIndexByTable(const std::string& table_id) {
BuildIndexByTable(const std::string& table_id);
Status
BuildIndex(const meta::TableFileSchema &);
......
......@@ -1479,6 +1479,11 @@ namespace meta {
return Status::OK();
}
Status MySQLMetaImpl::UpdateTableFilesToIndex(const std::string& table_id) {
// TODO
return Status::OK();
}
Status MySQLMetaImpl::UpdateTableFiles(TableFilesSchema &files) {
// std::lock_guard<std::recursive_mutex> lock(mysql_mutex);
......
......@@ -42,6 +42,8 @@ namespace meta {
virtual Status UpdateTableFile(TableFileSchema& file_schema) override;
virtual Status UpdateTableFilesToIndex(const std::string& table_id) override;
virtual Status UpdateTableFiles(TableFilesSchema& files) override;
virtual Status FilesToSearch(const std::string& table_id,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册