提交 6b52973b 编写于 作者: G groot

#654 Random crash when frequently insert vector one by one

上级 59526bdc
......@@ -46,6 +46,7 @@ Please mark all change in change log and use the ticket from JIRA.
- \#606 - No log generated during building index with CPU
- \#631 - FAISS isn't compiled with O3 option
- \#649 - Typo "partiton" should be "partition"
- \#654 - Random crash when frequently insert vector one by one
## Feature
- \#12 - Pure CPU version for Milvus
......
......@@ -116,6 +116,7 @@ MemManagerImpl::EraseMemVector(const std::string& table_id) {
size_t
MemManagerImpl::GetCurrentMutableMem() {
size_t total_mem = 0;
std::unique_lock<std::mutex> lock(mutex_);
for (auto& kv : mem_id_map_) {
auto memTable = kv.second;
total_mem += memTable->GetCurrentMem();
......@@ -126,6 +127,7 @@ MemManagerImpl::GetCurrentMutableMem() {
size_t
MemManagerImpl::GetCurrentImmutableMem() {
size_t total_mem = 0;
std::unique_lock<std::mutex> lock(serialization_mtx_);
for (auto& mem_table : immu_mem_list_) {
total_mem += mem_table->GetCurrentMem();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册