mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-30 23:45:28 +08:00
update
Former-commit-id: c7a11335bbf73b5100243b31ca34c36257604909
This commit is contained in:
parent
bd4977b64f
commit
9b74b7ae41
@ -600,6 +600,7 @@ void DBImpl::BackgroundCompaction(std::set<std::string> table_ids) {
|
||||
int ttl = 1;
|
||||
if (options_.mode == "cluster") {
|
||||
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);
|
||||
}
|
||||
|
||||
@ -56,7 +56,7 @@ public:
|
||||
// ENGINE_LOG_DEBUG << "conns_in_use_ in release: " << conns_in_use_ << std::endl;
|
||||
--conns_in_use_;
|
||||
if (conns_in_use_ < 0) {
|
||||
ENGINE_LOG_ERROR << "MySQLConnetionPool::release: conns_in_use_ is less than zero. conns_in_use_ = " << conns_in_use_ << std::endl;
|
||||
ENGINE_LOG_WARNING << "MySQLConnetionPool::release: conns_in_use_ is less than zero. conns_in_use_ = " << conns_in_use_ << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -448,9 +448,10 @@ namespace meta {
|
||||
Query deleteTableFilesQuery = connectionPtr->query();
|
||||
//
|
||||
deleteTableFilesQuery << "UPDATE TableFiles " <<
|
||||
"SET state = " << std::to_string(TableSchema::TO_DELETE) << ", " <<
|
||||
"SET file_type = " << std::to_string(TableSchema::TO_DELETE) << ", " <<
|
||||
"updated_time = " << std::to_string(utils::GetMicroSecTimeStamp()) << " " <<
|
||||
"WHERE table_id = " << quote << table_id << ";";
|
||||
"WHERE table_id = " << quote << table_id << " AND " <<
|
||||
"file_type <> " << std::to_string(TableSchema::TO_DELETE) << ";";
|
||||
|
||||
if (!deleteTableFilesQuery.exec()) {
|
||||
ENGINE_LOG_ERROR << "QUERY ERROR WHEN DELETING TABLE FILES";
|
||||
|
||||
@ -23,7 +23,9 @@ DBWrapper::DBWrapper() {
|
||||
if(index_size > 0) {//ensure larger than zero, unit is MB
|
||||
opt.index_trigger_size = (size_t)index_size * engine::ONE_MB;
|
||||
}
|
||||
opt.mode = config.GetValue(CONFIG_CLUSTER_MODE, "single");
|
||||
ConfigNode& serverConfig = ServerConfig::GetInstance().GetConfig(CONFIG_SERVER);
|
||||
opt.mode = serverConfig.GetValue(CONFIG_CLUSTER_MODE, "single");
|
||||
// std::cout << "mode = " << opt.mode << std::endl;
|
||||
|
||||
CommonUtil::CreateDirectory(opt.meta.path);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user