提交 9b74b7ae 编写于 作者: Z zhiru

update


Former-commit-id: c7a11335bbf73b5100243b31ca34c36257604909
上级 bd4977b6
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册