diff --git a/cpp/CHANGELOG.md b/cpp/CHANGELOG.md index 3ac9db25a1..812e62eb2d 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 8638a0da41..863f3db639 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 1309154a3c..73d28779b7 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_;