mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-03 20:39:36 +08:00
Merge pull request #524 from yhmo/0.6.0
#513 DELETE_BY_RANGE sometimes failed
This commit is contained in:
commit
bcd7322135
@ -21,6 +21,7 @@ Please mark all change in change log and use the ticket from JIRA.
|
||||
- \#440 - Server cannot startup with gpu_resource_config.enable=false in GPU version
|
||||
- \#458 - Index data is not compatible between 0.5 and 0.6
|
||||
- \#486 - gpu no usage during index building
|
||||
- \#513 - Unittest DELETE_BY_RANGE sometimes failed
|
||||
|
||||
## Feature
|
||||
- \#12 - Pure CPU version for Milvus
|
||||
|
@ -105,7 +105,8 @@ DBImpl::Stop() {
|
||||
shutting_down_.store(true, std::memory_order_release);
|
||||
|
||||
// makesure all memory data serialized
|
||||
MemSerialize();
|
||||
std::set<std::string> sync_table_ids;
|
||||
SyncMemData(sync_table_ids);
|
||||
|
||||
// wait compaction/buildindex finish
|
||||
bg_timer_thread_.join();
|
||||
@ -329,7 +330,10 @@ DBImpl::CreateIndex(const std::string& table_id, const TableIndex& index) {
|
||||
return SHUTDOWN_ERROR;
|
||||
}
|
||||
|
||||
Status status;
|
||||
// serialize memory data
|
||||
std::set<std::string> sync_table_ids;
|
||||
auto status = SyncMemData(sync_table_ids);
|
||||
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(build_index_mutex_);
|
||||
|
||||
@ -588,12 +592,12 @@ DBImpl::StartMetricTask() {
|
||||
}
|
||||
|
||||
Status
|
||||
DBImpl::MemSerialize() {
|
||||
DBImpl::SyncMemData(std::set<std::string>& sync_table_ids) {
|
||||
std::lock_guard<std::mutex> lck(mem_serialize_mutex_);
|
||||
std::set<std::string> temp_table_ids;
|
||||
mem_mgr_->Serialize(temp_table_ids);
|
||||
for (auto& id : temp_table_ids) {
|
||||
compact_table_ids_.insert(id);
|
||||
sync_table_ids.insert(id);
|
||||
}
|
||||
|
||||
if (!temp_table_ids.empty()) {
|
||||
@ -612,7 +616,7 @@ DBImpl::StartCompactionTask() {
|
||||
}
|
||||
|
||||
// serialize memory data
|
||||
MemSerialize();
|
||||
SyncMemData(compact_table_ids_);
|
||||
|
||||
// compactiong has been finished?
|
||||
{
|
||||
|
@ -150,7 +150,7 @@ class DBImpl : public DB {
|
||||
BackgroundBuildIndex();
|
||||
|
||||
Status
|
||||
MemSerialize();
|
||||
SyncMemData(std::set<std::string>& sync_table_ids);
|
||||
|
||||
Status
|
||||
GetFilesToBuildIndex(const std::string& table_id, const std::vector<int>& file_types,
|
||||
|
Loading…
Reference in New Issue
Block a user