diff --git a/cpp/CHANGELOG.md b/cpp/CHANGELOG.md index 3ac9db25a19b82286fcba1029c217237cb7765d4..812e62eb2de2e4fe237e65889442cef8fd5b9d28 100644 --- a/cpp/CHANGELOG.md +++ b/cpp/CHANGELOG.md @@ -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 diff --git a/cpp/src/db/DBImpl.cpp b/cpp/src/db/DBImpl.cpp index 8638a0da41c9057b0cf81454de8babdf628010aa..863f3db639c361cdbacdcb63da18fe563ac58e83 100644 --- a/cpp/src/db/DBImpl.cpp +++ b/cpp/src/db/DBImpl.cpp @@ -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 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; } diff --git a/cpp/src/db/DBImpl.h b/cpp/src/db/DBImpl.h index 1309154a3c92d1cdba63a8006a1a548def1129d5..73d28779b726cac4119920dc62eff5c37364258d 100644 --- a/cpp/src/db/DBImpl.h +++ b/cpp/src/db/DBImpl.h @@ -118,10 +118,8 @@ class DBImpl : public DB { BuildIndex(const meta::TableFileSchema &); private: - const Options options_; - Status bg_error_; std::atomic shutting_down_; std::thread bg_timer_thread_;