限制缓存在内存的配置文件内容的版本数量,以适应全增量模式的配置下发
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
#include "doris_server_http.h"
|
||||
|
||||
struct doris_global_info g_doris_server_info;
|
||||
static unsigned long doris_vesion_20210803=20210803L;
|
||||
static unsigned long doris_vesion_20210804=20210804L;
|
||||
|
||||
int doris_mkdir_according_path(const char * path)
|
||||
{
|
||||
@@ -215,7 +215,7 @@ static int32_t doris_init_config_for_business(struct doris_global_info *info, st
|
||||
info->name2business->insert(make_pair(string(business->bizname), business));
|
||||
|
||||
MESA_load_profile_uint_def(config_file, business->bizname, "grafana_monitor_status_id", &business->mm_status_codeid, 3);
|
||||
MESA_load_profile_uint_def(config_file, business->bizname, "doris_write_file_on", &business->write_file_sw, 1);
|
||||
MESA_load_profile_uint_def(config_file, business->bizname, "mem_cache_max_versions", &business->cache_max_versions, 0);
|
||||
if(0>MESA_load_profile_string_nodef(config_file, business->bizname, "store_config_path", business->store_path_root, sizeof(business->store_path_root)))
|
||||
{
|
||||
MESA_RUNTIME_LOGV3(info->log_runtime, RLOG_LV_FATAL, "%s: [%s]store_config_path not found!", bizname, config_file);
|
||||
@@ -327,18 +327,18 @@ int main(int argc, char **argv)
|
||||
evhttp_set_cb(manager_http, "/doris/statistic/status", manager_statistic_status_requests_cb, NULL);
|
||||
evhttp_set_cb(manager_http, "/doris/statistic/threads", manager_statistic_threads_requests_cb, NULL);
|
||||
evhttp_set_gencb(manager_http, manager_generic_requests_cb, NULL);
|
||||
g_doris_server_info.monitor = MESA_Monitor_instance_evhttp_new(manager_http, doris_vesion_20210803);
|
||||
g_doris_server_info.monitor = MESA_Monitor_instance_evhttp_new(manager_http, doris_vesion_20210804);
|
||||
if(evhttp_accept_socket(manager_http, g_doris_server_info.manager))
|
||||
{
|
||||
printf("evhttp_accept_socket %d error!\n", g_doris_server_info.manager);
|
||||
MESA_RUNTIME_LOGV3(g_doris_server_info.log_runtime, RLOG_LV_FATAL, "evhttp_accept_socket %d error!\n", g_doris_server_info.manager);
|
||||
assert(0); return -7;
|
||||
assert(0); return -3;
|
||||
}
|
||||
|
||||
//Ϊÿ<CEAA><C3BF>ҵ<EFBFBD><D2B5>ϵͳ<CFB5><CDB3>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD>õĽṹ
|
||||
if(doris_init_config_for_business(&g_doris_server_info, manage_evbase, NIRVANA_CONFIG_FILE))
|
||||
{
|
||||
return -8;
|
||||
return -4;
|
||||
}
|
||||
|
||||
pthread_attr_init(&attr);
|
||||
@@ -350,7 +350,7 @@ int main(int argc, char **argv)
|
||||
if(pthread_create(&thread_desc, &attr, thread_doris_client_recv_cfg, &g_doris_server_info.business[i]))
|
||||
{
|
||||
MESA_RUNTIME_LOGV3(g_doris_server_info.log_runtime, RLOG_LV_FATAL, "pthread_create(): %s", strerror(errno));
|
||||
assert(0);return -4;
|
||||
assert(0);return -5;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -358,7 +358,7 @@ int main(int argc, char **argv)
|
||||
if(pthread_create(&thread_desc, &attr, thread_index_file_recv_cfg, &g_doris_server_info.business[i]))
|
||||
{
|
||||
MESA_RUNTIME_LOGV3(g_doris_server_info.log_runtime, RLOG_LV_FATAL, "pthread_create(): %s", strerror(errno));
|
||||
assert(0);return -4;
|
||||
assert(0);return -6;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -369,14 +369,18 @@ int main(int argc, char **argv)
|
||||
g_doris_server_info.listener = doris_create_listen_socket(g_doris_server_info.server_port);
|
||||
if(g_doris_server_info.listener < 0)
|
||||
{
|
||||
return -5;
|
||||
return -7;
|
||||
}
|
||||
if(g_doris_server_info.ssl_conn_on && NULL==(g_doris_server_info.ssl_instance=doris_connections_create_ssl_ctx()))
|
||||
{
|
||||
assert(0);return -8;
|
||||
}
|
||||
for(u_int32_t i=0; i<g_doris_server_info.iothreads; i++)
|
||||
{
|
||||
if(pthread_create(&thread_desc, &attr, thread_doris_http_server, NULL))
|
||||
{
|
||||
MESA_RUNTIME_LOGV3(g_doris_server_info.log_runtime, RLOG_LV_FATAL, "pthread_create(): %s", strerror(errno));
|
||||
assert(0);return -4;
|
||||
assert(0);return -9;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user