mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-28 22:45:26 +08:00
Merge pull request #196 from yhmo/0.5.2
#194 Search faild: Table file doesnt exist
This commit is contained in:
commit
7a759709ee
@ -5,6 +5,7 @@ Please mark all change in change log and use the ticket from JIRA.
|
||||
# Milvus 0.5.2 (TODO)
|
||||
|
||||
## Bug
|
||||
- \#194 - Search faild: message="Table file doesn't exist"
|
||||
|
||||
## Feature
|
||||
|
||||
|
||||
@ -173,6 +173,7 @@ MySQLMetaImpl::~MySQLMetaImpl() {
|
||||
|
||||
Status
|
||||
MySQLMetaImpl::NextTableId(std::string& table_id) {
|
||||
std::lock_guard<std::mutex> lock(genid_mutex_); // avoid duplicated id
|
||||
std::stringstream ss;
|
||||
SimpleIDGenerator g;
|
||||
ss << g.GetNextIDNumber();
|
||||
@ -182,6 +183,7 @@ MySQLMetaImpl::NextTableId(std::string& table_id) {
|
||||
|
||||
Status
|
||||
MySQLMetaImpl::NextFileId(std::string& file_id) {
|
||||
std::lock_guard<std::mutex> lock(genid_mutex_); // avoid duplicated id
|
||||
std::stringstream ss;
|
||||
SimpleIDGenerator g;
|
||||
ss << g.GetNextIDNumber();
|
||||
|
||||
@ -136,6 +136,7 @@ class MySQLMetaImpl : public Meta {
|
||||
std::shared_ptr<MySQLConnectionPool> mysql_connection_pool_;
|
||||
bool safe_grab_ = false;
|
||||
|
||||
std::mutex genid_mutex_;
|
||||
// std::mutex connectionMutex_;
|
||||
}; // DBMetaImpl
|
||||
|
||||
|
||||
@ -97,6 +97,7 @@ SqliteMetaImpl::~SqliteMetaImpl() {
|
||||
|
||||
Status
|
||||
SqliteMetaImpl::NextTableId(std::string &table_id) {
|
||||
std::lock_guard<std::mutex> lock(genid_mutex_); // avoid duplicated id
|
||||
std::stringstream ss;
|
||||
SimpleIDGenerator g;
|
||||
ss << g.GetNextIDNumber();
|
||||
@ -106,6 +107,7 @@ SqliteMetaImpl::NextTableId(std::string &table_id) {
|
||||
|
||||
Status
|
||||
SqliteMetaImpl::NextFileId(std::string &file_id) {
|
||||
std::lock_guard<std::mutex> lock(genid_mutex_); // avoid duplicated id
|
||||
std::stringstream ss;
|
||||
SimpleIDGenerator g;
|
||||
ss << g.GetNextIDNumber();
|
||||
|
||||
@ -132,6 +132,7 @@ class SqliteMetaImpl : public Meta {
|
||||
private:
|
||||
const DBMetaOptions options_;
|
||||
std::mutex meta_mutex_;
|
||||
std::mutex genid_mutex_;
|
||||
}; // DBMetaImpl
|
||||
|
||||
} // namespace meta
|
||||
|
||||
@ -185,7 +185,7 @@ TEST_F(MySqlMetaTest, ARCHIVE_TEST_DISK) {
|
||||
|
||||
options.archive_conf_ = milvus::engine::ArchiveConf("delete", "disk:11");
|
||||
int mode = milvus::engine::DBOptions::MODE::SINGLE;
|
||||
auto impl = milvus::engine::meta::MySQLMetaImpl(options, mode);
|
||||
milvus::engine::meta::MySQLMetaImpl impl(options, mode);
|
||||
auto table_id = "meta_test_group";
|
||||
|
||||
milvus::engine::meta::TableSchema table;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user