提交 830ae4ae 编写于 作者: P peng.xu

Merge branch 'branch-0.3.1' into 'branch-0.3.1'

MS-232: add MySQLMetaImpl::UpdateTableFilesToIndex and set maximum_memory to default if config value = 0

See merge request megasearch/milvus!211

Former-commit-id: 403259e5e3aaf3824ece752c5ea289f5d4eda061
......@@ -14,6 +14,8 @@ Please mark all change in change log and use the ticket from JIRA.
- MS-190 - use env variable to switch mem manager and fix cmake
- MS-217 - Fix SQ8 row count bug
- MS-224 - Return AlreadyExist status in MySQLMetaImpl::CreateTable if table already exists
- MS-232 - add MySQLMetaImpl::UpdateTableFilesToIndex and set maximum_memory to default if config value = 0
- MS-233 - remove mem manager log
## Improvement
- MS-156 - Add unittest for merge result functions
......
......@@ -125,9 +125,6 @@ Status MemManager::InsertVectors(const std::string &table_id_,
const float *vectors_,
IDNumbers &vector_ids_) {
LOG(DEBUG) << "MemManager::InsertVectors: mutable mem = " << GetCurrentMutableMem() <<
", immutable mem = " << GetCurrentImmutableMem() << ", total mem = " << GetCurrentMem();
std::unique_lock<std::mutex> lock(mutex_);
return InsertVectorsNoLock(table_id_, n_, vectors_, vector_ids_);
......
此差异已折叠。
......@@ -29,9 +29,6 @@ Status NewMemManager::InsertVectors(const std::string &table_id_,
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
LOG(DEBUG) << "NewMemManager::InsertVectors: mutable mem = " << GetCurrentMutableMem() <<
", immutable mem = " << GetCurrentImmutableMem() << ", total mem = " << GetCurrentMem();
std::unique_lock<std::mutex> lock(mutex_);
return InsertVectorsNoLock(table_id_, n_, vectors_, vector_ids_);
......
......@@ -63,7 +63,7 @@ struct Options {
size_t index_trigger_size = ONE_GB; //unit: byte
DBMetaOptions meta;
int mode = MODE::SINGLE;
float maximum_memory = 4 * ONE_GB;
size_t maximum_memory = 4 * ONE_GB;
}; // Options
......
......@@ -28,11 +28,11 @@ DBWrapper::DBWrapper() {
if(index_size > 0) {//ensure larger than zero, unit is MB
opt.index_trigger_size = (size_t)index_size * engine::ONE_MB;
}
float maximum_memory = config.GetFloatValue(CONFIG_MAXMIMUM_MEMORY);
int64_t maximum_memory = config.GetInt64Value(CONFIG_MAXMIMUM_MEMORY);
if (maximum_memory > 1.0) {
opt.maximum_memory = maximum_memory * engine::ONE_GB;
}
else {
else if (maximum_memory != 0) { //if maximum_memory = 0, set it to default
std::cout << "ERROR: maximum_memory should be at least 1 GB" << std::endl;
kill(0, SIGUSR1);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册