@@ -51,19 +51,13 @@ DEFINE_FLAG_BOOL(logtail_mode, "logtail mode", true);
51
51
DEFINE_FLAG_BOOL (logtail_mode, " logtail mode" , false );
52
52
#endif
53
53
DEFINE_FLAG_INT32 (max_buffer_num, " max size" , 40 );
54
- DEFINE_FLAG_INT32 (pub_max_buffer_num, " max size" , 8 );
55
- DEFINE_FLAG_INT32 (pub_max_send_byte_per_sec, " the max send speed per sec, realtime thread" , 20 * 1024 * 1024 );
56
54
DEFINE_FLAG_INT32 (default_send_byte_per_sec, " the max send speed per sec, replay buffer thread" , 2 * 1024 * 1024 );
57
- DEFINE_FLAG_INT32 (pub_send_byte_per_sec, " the max send speed per sec, replay buffer thread" , 1 * 1024 * 1024 );
58
55
DEFINE_FLAG_INT32 (default_buffer_file_num, " how many buffer files in default" , 50 );
59
- DEFINE_FLAG_INT32 (pub_buffer_file_num, " how many buffer files in default" , 25 );
60
56
DEFINE_FLAG_INT32 (default_local_file_size, " default size of one buffer file" , 20 * 1024 * 1024 );
61
- DEFINE_FLAG_INT32 (pub_local_file_size, " default size of one buffer file" , 20 * 1024 * 1024 );
62
57
DEFINE_FLAG_INT32 (process_thread_count, " " , 1 );
63
58
DEFINE_FLAG_INT32 (send_request_concurrency, " max count keep in mem when async send" , 15 );
64
59
DEFINE_FLAG_STRING (default_buffer_file_path, " set current execution dir in default" , " " );
65
60
DEFINE_FLAG_STRING (buffer_file_path, " set buffer dir" , " " );
66
- // DEFINE_FLAG_STRING(default_mapping_config_path, "", "mapping_config.json");
67
61
DEFINE_FLAG_DOUBLE (default_machine_cpu_usage_threshold, " machine level" , 0.4 );
68
62
DEFINE_FLAG_BOOL (default_resource_auto_scale, " " , false );
69
63
DEFINE_FLAG_BOOL (default_input_flow_control, " " , false );
@@ -76,42 +70,13 @@ DEFINE_FLAG_STRING(logtail_sys_conf_dir, "store machine-unique-id, user-defined-
76
70
#elif defined(_MSC_VER)
77
71
DEFINE_FLAG_STRING (logtail_sys_conf_dir, " store machine-unique-id, user-defined-id, aliuid" , " C:\\ LogtailData\\ " );
78
72
#endif
79
- // const char* DEFAULT_ILOGTAIL_LOCAL_CONFIG_FLAG_VALUE = "user_local_config.json";
80
- // DEFINE_FLAG_STRING(ilogtail_local_config, "local ilogtail config file", DEFAULT_ILOGTAIL_LOCAL_CONFIG_FLAG_VALUE);
81
- // const char* DEFAULT_ILOGTAIL_LOCAL_CONFIG_DIR_FLAG_VALUE = "user_config.d";
82
- // DEFINE_FLAG_STRING(ilogtail_local_config_dir,
83
- // "local ilogtail config file dir",
84
- // DEFAULT_ILOGTAIL_LOCAL_CONFIG_DIR_FLAG_VALUE);
85
- // const char* DEFAULT_ILOGTAIL_LOCAL_YAML_CONFIG_DIR_FLAG_VALUE = "user_yaml_config.d";
86
- // DEFINE_FLAG_STRING(ilogtail_local_yaml_config_dir,
87
- // "local ilogtail yaml config file dir",
88
- // DEFAULT_ILOGTAIL_LOCAL_YAML_CONFIG_DIR_FLAG_VALUE);
89
- // const char* DEFAULT_ILOGTAIL_REMOTE_YAML_CONFIG_DIR_FLAG_VALUE = "remote_yaml_config.d";
90
- // DEFINE_FLAG_STRING(ilogtail_remote_yaml_config_dir,
91
- // "remote ilogtail yaml config file dir",
92
- // DEFAULT_ILOGTAIL_REMOTE_YAML_CONFIG_DIR_FLAG_VALUE);
93
-
94
- // DEFINE_FLAG_BOOL(default_global_fuse_mode, "default global fuse mode", false);
95
- // DEFINE_FLAG_BOOL(default_global_mark_offset_flag, "default global mark offset flag", false);
96
-
97
- // DEFINE_FLAG_STRING(default_container_mount_path, "", "container_mount.json");
98
73
DEFINE_FLAG_STRING (default_include_config_path, " " , " config.d" );
99
74
100
75
DEFINE_FLAG_INT32 (default_oas_connect_timeout, " default (minimum) connect timeout for OSARequest" , 5 );
101
76
DEFINE_FLAG_INT32 (default_oas_request_timeout, " default (minimum) request timeout for OSARequest" , 10 );
102
- // DEFINE_FLAG_BOOL(rapid_retry_update_config, "", false);
103
77
DEFINE_FLAG_BOOL (check_profile_region, " " , false );
104
- // DEFINE_FLAG_BOOL(enable_collection_mark,
105
- // "enable collection mark function to override check_ulogfs_env in user config",
106
- // false);
107
- // DEFINE_FLAG_BOOL(enable_env_ref_in_config, "enable environment variable reference replacement in configuration",
108
- // false);
109
78
DEFINE_FLAG_INT32 (data_server_port, " " , 80 );
110
79
111
- // DEFINE_FLAG_STRING(alipay_app_zone, "", "ALIPAY_APP_ZONE");
112
- // DEFINE_FLAG_STRING(alipay_zone, "", "ALIPAY_ZONE");
113
- // DEFINE_FLAG_STRING(alipay_zone_env_name, "", "");
114
-
115
80
DECLARE_FLAG_INT32 (polling_max_stat_count);
116
81
DECLARE_FLAG_INT32 (polling_max_stat_count_per_dir);
117
82
DECLARE_FLAG_INT32 (polling_max_stat_count_per_config);
@@ -156,9 +121,6 @@ DEFINE_FLAG_STRING(ALIYUN_LOG_FILE_TAGS, "default env file key to load tags", ""
156
121
DEFINE_FLAG_INT32 (max_holded_data_size,
157
122
" for every id and metric name, the max data size can be holded in memory (default 512KB)" ,
158
123
512 * 1024 );
159
- DEFINE_FLAG_INT32 (pub_max_holded_data_size,
160
- " for every id and metric name, the max data size can be holded in memory (default 512KB)" ,
161
- 512 * 1024 );
162
124
DEFINE_FLAG_STRING (metrics_report_method,
163
125
" method to report metrics (default none, means logtail will not report metrics)" ,
164
126
" sls" );
@@ -911,55 +873,31 @@ void AppConfig::LoadResourceConf(const Json::Value& confJson) {
911
873
912
874
if (confJson.isMember (" max_bytes_per_sec" ) && confJson[" max_bytes_per_sec" ].isInt ())
913
875
mMaxBytePerSec = confJson[" max_bytes_per_sec" ].asInt ();
914
- #ifdef __ENTERPRISE__
915
- else if (EnterpriseConfigProvider::GetInstance ()->IsOldPubRegion ())
916
- mMaxBytePerSec = INT32_FLAG (pub_max_send_byte_per_sec);
917
- #endif
918
876
else
919
877
mMaxBytePerSec = kDefaultMaxSendBytePerSec ;
920
878
921
879
if (confJson.isMember (" bytes_per_sec" ) && confJson[" bytes_per_sec" ].isInt ())
922
880
mBytePerSec = confJson[" bytes_per_sec" ].asInt ();
923
- #ifdef __ENTERPRISE__
924
- else if (EnterpriseConfigProvider::GetInstance ()->IsOldPubRegion ())
925
- mBytePerSec = INT32_FLAG (pub_send_byte_per_sec);
926
- #endif
927
881
else
928
882
mBytePerSec = INT32_FLAG (default_send_byte_per_sec);
929
883
930
884
if (confJson.isMember (" buffer_file_num" ) && confJson[" buffer_file_num" ].isInt ())
931
885
mNumOfBufferFile = confJson[" buffer_file_num" ].asInt ();
932
- #ifdef __ENTERPRISE__
933
- else if (EnterpriseConfigProvider::GetInstance ()->IsOldPubRegion ())
934
- mNumOfBufferFile = INT32_FLAG (pub_buffer_file_num);
935
- #endif
936
886
else
937
887
mNumOfBufferFile = INT32_FLAG (default_buffer_file_num);
938
888
939
889
if (confJson.isMember (" buffer_file_size" ) && confJson[" buffer_file_size" ].isInt ())
940
890
mLocalFileSize = confJson[" buffer_file_size" ].asInt ();
941
- #ifdef __ENTERPRISE__
942
- else if (EnterpriseConfigProvider::GetInstance ()->IsOldPubRegion ())
943
- mLocalFileSize = INT32_FLAG (pub_local_file_size);
944
- #endif
945
891
else
946
892
mLocalFileSize = INT32_FLAG (default_local_file_size);
947
893
948
894
if (confJson.isMember (" buffer_map_size" ) && confJson[" buffer_map_size" ].isInt ())
949
895
mMaxHoldedDataSize = confJson[" buffer_map_size" ].asInt ();
950
- #ifdef __ENTERPRISE__
951
- else if (EnterpriseConfigProvider::GetInstance ()->IsOldPubRegion ())
952
- mMaxHoldedDataSize = INT32_FLAG (pub_max_holded_data_size);
953
- #endif
954
896
else
955
897
mMaxHoldedDataSize = INT32_FLAG (max_holded_data_size);
956
898
957
899
if (confJson.isMember (" buffer_map_num" ) && confJson[" buffer_map_num" ].isInt ())
958
900
mMaxBufferNum = confJson[" buffer_map_num" ].asInt ();
959
- #ifdef __ENTERPRISE__
960
- else if (EnterpriseConfigProvider::GetInstance ()->IsOldPubRegion ())
961
- mMaxBufferNum = INT32_FLAG (pub_max_buffer_num);
962
- #endif
963
901
else
964
902
mMaxBufferNum = INT32_FLAG (max_buffer_num);
965
903
@@ -1004,33 +942,16 @@ void AppConfig::LoadResourceConf(const Json::Value& confJson) {
1004
942
mCpuUsageUpLimit = confJson[" cpu_usage_limit" ].asDouble ();
1005
943
else if (confJson[" cpu_usage_limit" ].isIntegral ())
1006
944
mCpuUsageUpLimit = double (confJson[" cpu_usage_limit" ].asInt64 ());
1007
- #ifdef __ENTERPRISE__
1008
- else if (EnterpriseConfigProvider::GetInstance ()->IsOldPubRegion ())
1009
- mCpuUsageUpLimit = DOUBLE_FLAG (pub_cpu_usage_up_limit);
1010
- #endif
1011
945
else
1012
946
mCpuUsageUpLimit = DOUBLE_FLAG (cpu_usage_up_limit);
1013
- #ifdef __ENTERPRISE__
1014
- } else if (EnterpriseConfigProvider::GetInstance ()->IsOldPubRegion ()) {
1015
- mCpuUsageUpLimit = DOUBLE_FLAG (pub_cpu_usage_up_limit);
1016
- #endif
1017
947
} else
1018
948
mCpuUsageUpLimit = DOUBLE_FLAG (cpu_usage_up_limit);
1019
949
1020
950
if (confJson.isMember (" mem_usage_limit" ) && confJson[" mem_usage_limit" ].isIntegral ())
1021
951
mMemUsageUpLimit = confJson[" mem_usage_limit" ].asInt64 ();
1022
- #ifdef __ENTERPRISE__
1023
- else if (EnterpriseConfigProvider::GetInstance ()->IsOldPubRegion ())
1024
- mMemUsageUpLimit = INT64_FLAG (pub_memory_usage_up_limit);
1025
- #endif
1026
952
else
1027
953
mMemUsageUpLimit = INT64_FLAG (memory_usage_up_limit);
1028
954
1029
- if ((mMemUsageUpLimit == 80 || mMemUsageUpLimit == 100 )
1030
- && mMemUsageUpLimit < INT64_FLAG (pub_memory_usage_up_limit)) {
1031
- mMemUsageUpLimit = INT64_FLAG (pub_memory_usage_up_limit);
1032
- }
1033
-
1034
955
if (confJson.isMember (" resource_auto_scale" ) && confJson[" resource_auto_scale" ].isBool ())
1035
956
mResourceAutoScale = confJson[" resource_auto_scale" ].asBool ();
1036
957
else
0 commit comments