mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-02 11:59:00 +08:00
Merge branch 'branch-0.3.1' into 'branch-0.3.1'
MS-234 Some case cause background merge thread stop See merge request megasearch/milvus!221 Former-commit-id: b58d96af019405602c2b7e25ccb989ff847694f2
This commit is contained in:
commit
76f60fd76b
@ -17,6 +17,7 @@ Please mark all change in change log and use the ticket from JIRA.
|
||||
- MS-232 - Add MySQLMetaImpl::UpdateTableFilesToIndex and set maximum_memory to default if config value = 0
|
||||
- MS-233 - Remove mem manager log
|
||||
- MS-230 - Change parameter name: Maximum_memory to insert_buffer_size
|
||||
- MS-234 - Some case cause background merge thread stop
|
||||
|
||||
## Improvement
|
||||
- MS-156 - Add unittest for merge result functions
|
||||
|
@ -236,7 +236,6 @@ void DBImpl::BackgroundTimerTask() {
|
||||
Status status;
|
||||
server::SystemInfo::GetInstance().Init();
|
||||
while (true) {
|
||||
if (!bg_error_.ok()) break;
|
||||
if (shutting_down_.load(std::memory_order_acquire)){
|
||||
for(auto& iter : compact_thread_results_) {
|
||||
iter.wait();
|
||||
@ -395,8 +394,7 @@ void DBImpl::BackgroundCompaction(std::set<std::string> table_ids) {
|
||||
for (auto& table_id : table_ids) {
|
||||
status = BackgroundMergeFiles(table_id);
|
||||
if (!status.ok()) {
|
||||
ENGINE_LOG_ERROR << "BGERROR found during merge files: " << status.ToString();
|
||||
bg_error_ = status;
|
||||
ENGINE_LOG_ERROR << "Merge files for table " << table_id << " failed: " << status.ToString();
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -540,8 +538,7 @@ void DBImpl::BackgroundBuildIndex() {
|
||||
for (auto& file : to_index_files) {
|
||||
status = BuildIndex(file);
|
||||
if (!status.ok()) {
|
||||
ENGINE_LOG_ERROR << "BGERROR found during build index: " << status.ToString();
|
||||
bg_error_ = status;
|
||||
ENGINE_LOG_ERROR << "Building index for " << file.id_ << " failed: " << status.ToString();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -118,10 +118,8 @@ class DBImpl : public DB {
|
||||
BuildIndex(const meta::TableFileSchema &);
|
||||
|
||||
private:
|
||||
|
||||
const Options options_;
|
||||
|
||||
Status bg_error_;
|
||||
std::atomic<bool> shutting_down_;
|
||||
|
||||
std::thread bg_timer_thread_;
|
||||
|
Loading…
Reference in New Issue
Block a user