提交 832c24c4 编写于 作者: G groot

MS-234 Some case cause background merge thread stop


Former-commit-id: 01865f2de8c7ac9909e1e516a4c5d51fdb6e8d00
container('milvus-build-env') { container('milvus-build-env') {
timeout(time: 20, unit: 'MINUTES') { timeout(time: 30, unit: 'MINUTES') {
gitlabCommitStatus(name: 'Build Engine') { gitlabCommitStatus(name: 'Build Engine') {
dir ("milvus_engine") { dir ("milvus_engine") {
try { try {
...@@ -17,4 +17,3 @@ container('milvus-build-env') { ...@@ -17,4 +17,3 @@ container('milvus-build-env') {
} }
} }
} }
container('milvus-build-env') { container('milvus-build-env') {
timeout(time: 20, unit: 'MINUTES') { timeout(time: 30, unit: 'MINUTES') {
gitlabCommitStatus(name: 'Build Engine') { gitlabCommitStatus(name: 'Build Engine') {
dir ("milvus_engine") { dir ("milvus_engine") {
try { try {
...@@ -17,4 +17,3 @@ container('milvus-build-env') { ...@@ -17,4 +17,3 @@ container('milvus-build-env') {
} }
} }
} }
...@@ -17,6 +17,7 @@ Please mark all change in change log and use the ticket from JIRA. ...@@ -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-232 - Add MySQLMetaImpl::UpdateTableFilesToIndex and set maximum_memory to default if config value = 0
- MS-233 - Remove mem manager log - MS-233 - Remove mem manager log
- MS-230 - Change parameter name: Maximum_memory to insert_buffer_size - MS-230 - Change parameter name: Maximum_memory to insert_buffer_size
- MS-234 - Some case cause background merge thread stop
## Improvement ## Improvement
- MS-156 - Add unittest for merge result functions - MS-156 - Add unittest for merge result functions
......
...@@ -89,6 +89,7 @@ DBImpl::DBImpl(const Options& options) ...@@ -89,6 +89,7 @@ DBImpl::DBImpl(const Options& options)
meta_ptr_ = DBMetaImplFactory::Build(options.meta, options.mode); meta_ptr_ = DBMetaImplFactory::Build(options.meta, options.mode);
mem_mgr_ = MemManagerFactory::Build(meta_ptr_, options_); mem_mgr_ = MemManagerFactory::Build(meta_ptr_, options_);
if (options.mode != Options::MODE::READ_ONLY) { if (options.mode != Options::MODE::READ_ONLY) {
ENGINE_LOG_INFO << "StartTimerTasks";
StartTimerTasks(); StartTimerTasks();
} }
} }
...@@ -389,10 +390,6 @@ Status DBImpl::BackgroundMergeFiles(const std::string& table_id) { ...@@ -389,10 +390,6 @@ Status DBImpl::BackgroundMergeFiles(const std::string& table_id) {
} }
void DBImpl::BackgroundCompaction(std::set<std::string> table_ids) { void DBImpl::BackgroundCompaction(std::set<std::string> table_ids) {
// static int b_count = 0;
// b_count++;
// std::cout << "BackgroundCompaction: " << b_count << std::endl;
Status status; Status status;
for (auto& table_id : table_ids) { for (auto& table_id : table_ids) {
status = BackgroundMergeFiles(table_id); status = BackgroundMergeFiles(table_id);
...@@ -407,7 +404,6 @@ void DBImpl::BackgroundCompaction(std::set<std::string> table_ids) { ...@@ -407,7 +404,6 @@ void DBImpl::BackgroundCompaction(std::set<std::string> table_ids) {
int ttl = 1; int ttl = 1;
if (options_.mode == Options::MODE::CLUSTER) { if (options_.mode == Options::MODE::CLUSTER) {
ttl = meta::D_SEC; ttl = meta::D_SEC;
// ENGINE_LOG_DEBUG << "Server mode is cluster. Clean up files with ttl = " << std::to_string(ttl) << "seconds.";
} }
meta_ptr_->CleanUpFilesWithTTL(ttl); meta_ptr_->CleanUpFilesWithTTL(ttl);
} }
...@@ -540,7 +536,6 @@ void DBImpl::BackgroundBuildIndex() { ...@@ -540,7 +536,6 @@ void DBImpl::BackgroundBuildIndex() {
meta_ptr_->FilesToIndex(to_index_files); meta_ptr_->FilesToIndex(to_index_files);
Status status; Status status;
for (auto& file : to_index_files) { for (auto& file : to_index_files) {
/* ENGINE_LOG_DEBUG << "Buiding index for " << file.location; */
status = BuildIndex(file); status = BuildIndex(file);
if (!status.ok()) { if (!status.ok()) {
ENGINE_LOG_ERROR << "Building index for " << file.id_ << " failed: " << status.ToString(); ENGINE_LOG_ERROR << "Building index for " << file.id_ << " failed: " << status.ToString();
...@@ -551,7 +546,6 @@ void DBImpl::BackgroundBuildIndex() { ...@@ -551,7 +546,6 @@ void DBImpl::BackgroundBuildIndex() {
break; break;
} }
} }
/* ENGINE_LOG_DEBUG << "All Buiding index Done"; */
} }
Status DBImpl::DropAll() { Status DBImpl::DropAll() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册