Coverage Report

Created: 2026-08-24 11:39

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/cloud/config.h
Line
Count
Source
1
// Licensed to the Apache Software Foundation (ASF) under one
2
// or more contributor license agreements.  See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership.  The ASF licenses this file
5
// to you under the Apache License, Version 2.0 (the
6
// "License"); you may not use this file except in compliance
7
// with the License.  You may obtain a copy of the License at
8
//
9
//   http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing,
12
// software distributed under the License is distributed on an
13
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
// KIND, either express or implied.  See the License for the
15
// specific language governing permissions and limitations
16
// under the License.
17
18
#pragma once
19
20
#include "common/config.h"
21
22
namespace doris::config {
23
24
DECLARE_String(deploy_mode);
25
// deprecated do not configure directly
26
DECLARE_mString(cloud_unique_id);
27
28
11.1M
static inline bool is_cloud_mode() {
29
11.1M
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
11.1M
}
doris_main.cpp:_ZN5doris6configL13is_cloud_modeEv
Line
Count
Source
28
7
static inline bool is_cloud_mode() {
29
7
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
7
}
unity_0_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
Line
Count
Source
28
1.36M
static inline bool is_cloud_mode() {
29
1.36M
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
1.36M
}
config.cpp:_ZN5doris6configL13is_cloud_modeEv
Line
Count
Source
28
17
static inline bool is_cloud_mode() {
29
17
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
17
}
unity_1_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
Line
Count
Source
28
23
static inline bool is_cloud_mode() {
29
23
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
23
}
unity_7_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
Line
Count
Source
28
24.5k
static inline bool is_cloud_mode() {
29
24.5k
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
24.5k
}
Unexecuted instantiation: unity_6_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
unity_12_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
Line
Count
Source
28
2.47M
static inline bool is_cloud_mode() {
29
2.47M
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
2.47M
}
Unexecuted instantiation: unity_11_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
Unexecuted instantiation: unity_10_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
unity_2_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
Line
Count
Source
28
336k
static inline bool is_cloud_mode() {
29
336k
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
336k
}
unity_9_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
Line
Count
Source
28
1.43M
static inline bool is_cloud_mode() {
29
1.43M
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
1.43M
}
unity_5_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
Line
Count
Source
28
2.80M
static inline bool is_cloud_mode() {
29
2.81M
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
2.80M
}
unity_4_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
Line
Count
Source
28
790
static inline bool is_cloud_mode() {
29
790
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
790
}
Unexecuted instantiation: operator.cpp:_ZN5doris6configL13is_cloud_modeEv
unity_3_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
Line
Count
Source
28
6.26k
static inline bool is_cloud_mode() {
29
6.26k
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
6.26k
}
unity_26_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
Line
Count
Source
28
57.0k
static inline bool is_cloud_mode() {
29
57.0k
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
57.0k
}
unity_25_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
Line
Count
Source
28
26.6k
static inline bool is_cloud_mode() {
29
26.6k
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
26.6k
}
Unexecuted instantiation: unity_24_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
Unexecuted instantiation: unity_23_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
unity_22_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
Line
Count
Source
28
1.46M
static inline bool is_cloud_mode() {
29
1.46M
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
1.46M
}
Unexecuted instantiation: unity_21_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
unity_20_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
Line
Count
Source
28
540
static inline bool is_cloud_mode() {
29
540
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
540
}
Unexecuted instantiation: unity_19_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
unity_18_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
Line
Count
Source
28
27.1k
static inline bool is_cloud_mode() {
29
27.2k
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
27.1k
}
unity_17_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
Line
Count
Source
28
1.17M
static inline bool is_cloud_mode() {
29
1.17M
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
1.17M
}
Unexecuted instantiation: inverted_index_fs_directory.cpp:_ZN5doris6configL13is_cloud_modeEv
Unexecuted instantiation: tablet.cpp:_ZN5doris6configL13is_cloud_modeEv
Unexecuted instantiation: engine_clone_task.cpp:_ZN5doris6configL13is_cloud_modeEv
Unexecuted instantiation: backend_service.cpp:_ZN5doris6configL13is_cloud_modeEv
Unexecuted instantiation: internal_service.cpp:_ZN5doris6configL13is_cloud_modeEv
point_query_executor.cpp:_ZN5doris6configL13is_cloud_modeEv
Line
Count
Source
28
454
static inline bool is_cloud_mode() {
29
454
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
454
}
be_server_starter_factory.cpp:_ZN5doris6configL13is_cloud_modeEv
Line
Count
Source
28
7
static inline bool is_cloud_mode() {
29
7
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
7
}
http_service.cpp:_ZN5doris6configL13is_cloud_modeEv
Line
Count
Source
28
7
static inline bool is_cloud_mode() {
29
7
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
7
}
Unexecuted instantiation: thrift_util.cpp:_ZN5doris6configL13is_cloud_modeEv
load_stream.cpp:_ZN5doris6configL13is_cloud_modeEv
Line
Count
Source
28
1
static inline bool is_cloud_mode() {
29
1
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
1
}
Unexecuted instantiation: cloud_compaction_action.cpp:_ZN5doris6configL13is_cloud_modeEv
31
32
// Set the endpoint of meta service.
33
//
34
// If meta services are deployed behind a load balancer, set this config to "host:port" of the load balancer.
35
// Here is a set of configs to configure the connection behaviors:
36
// - meta_service_connection_pooled: distribute the long connections to different RS of the VIP.
37
// - meta_service_connection_age_base_seconds: expire the connection after a random time during [base, 2*base],
38
//      so that the BE has a chance to connect to a new RS. (When you add a new RS, the BE will connect to it)
39
// - meta_service_idle_connection_timeout_ms: rebuild the idle connections after the timeout exceeds. Some LB
40
// vendors will reset the connection if it is idle for a long time.
41
//
42
// If you want to access a group of meta services directly, set the addresses of meta services to this config,
43
// separated by a comma, like "host:port,host:port,host:port", then BE will choose a server to connect in randomly.
44
// In this mode, The config meta_service_connection_pooled is still useful, but the other two configs will be ignored.
45
DECLARE_mString(meta_service_endpoint);
46
// Whether check config::meta_service_endpoint is identical to the ms endpoint from FE master heartbeat
47
// This may help in some cases that we intend to change the config only FE side or BE side
48
DECLARE_mBool(enable_meta_service_endpoint_consistency_check);
49
// Set the underlying connection type to pooled.
50
DECLARE_Bool(meta_service_connection_pooled);
51
DECLARE_mInt64(meta_service_connection_pool_size);
52
// A connection will expire after a random time during [base, 2*base], so that the BE
53
// has a chance to connect to a new RS. Set zero to disable it.
54
//
55
// Only works when meta_service_endpoint is set to a single host.
56
DECLARE_mInt32(meta_service_connection_age_base_seconds);
57
// Rebuild the idle connections after the timeout exceeds. Set zero to disable it.
58
//
59
// Only works when meta_service_endpoint is set to a single host.
60
DECLARE_mInt32(meta_service_idle_connection_timeout_ms);
61
DECLARE_mInt32(meta_service_rpc_retry_times);
62
// default brpc timeout
63
DECLARE_mInt32(meta_service_brpc_timeout_ms);
64
DECLARE_mInt32(meta_service_rpc_timeout_retry_times);
65
66
// CloudTabletMgr config
67
DECLARE_Int64(tablet_cache_capacity);
68
DECLARE_Int64(tablet_cache_shards);
69
DECLARE_mInt32(tablet_sync_interval_s);
70
// parallelism for scanner init where may issue RPCs to sync rowset meta from MS
71
DECLARE_mInt32(init_scanner_sync_rowsets_parallelism);
72
DECLARE_mInt32(sync_rowsets_slow_threshold_ms);
73
74
// Cloud compaction config
75
DECLARE_mInt64(min_compaction_failure_interval_ms);
76
DECLARE_mBool(enable_new_tablet_do_compaction);
77
// Enable empty rowset compaction strategy
78
DECLARE_mBool(enable_empty_rowset_compaction);
79
// Minimum number of consecutive empty rowsets to trigger compaction
80
DECLARE_mInt32(empty_rowset_compaction_min_count);
81
// Minimum percentage of empty rowsets to trigger compaction
82
DECLARE_mDouble(empty_rowset_compaction_min_ratio);
83
// For cloud read/write separate mode
84
DECLARE_mInt64(base_compaction_freeze_interval_s);
85
DECLARE_mInt64(compaction_load_max_freeze_interval_s);
86
DECLARE_mInt64(cumu_compaction_interval_s);
87
88
DECLARE_mInt32(compaction_timeout_seconds);
89
DECLARE_mInt32(lease_compaction_interval_seconds);
90
DECLARE_mBool(enable_parallel_cumu_compaction);
91
DECLARE_mDouble(base_compaction_thread_num_factor);
92
DECLARE_mDouble(cumu_compaction_thread_num_factor);
93
DECLARE_mDouble(binlog_compaction_thread_num_factor);
94
DECLARE_mInt32(check_auto_compaction_interval_seconds);
95
DECLARE_mInt32(max_base_compaction_task_num_per_disk);
96
DECLARE_mBool(prioritize_query_perf_in_compaction);
97
DECLARE_mInt32(compaction_max_rowset_count);
98
DECLARE_mInt64(compaction_txn_max_size_bytes);
99
DECLARE_mBool(enable_cloud_single_rowset_compaction);
100
DECLARE_mInt32(cloud_single_rowset_compaction_min_segments);
101
DECLARE_mInt32(cloud_single_rowset_compaction_segment_group_size);
102
103
// CloudStorageEngine config
104
DECLARE_mInt32(refresh_s3_info_interval_s);
105
DECLARE_mInt32(vacuum_stale_rowsets_interval_s);
106
DECLARE_mInt32(schedule_sync_tablets_interval_s);
107
108
// Cloud mow
109
DECLARE_mInt32(mow_stream_load_commit_retry_times);
110
111
DECLARE_mBool(save_load_error_log_to_s3);
112
113
// Whether to use public endpoint for error log presigned URL
114
DECLARE_mBool(use_public_endpoint_for_error_log);
115
116
// the theads which sync the datas which loaded in other clusters
117
DECLARE_mInt32(sync_load_for_tablets_thread);
118
119
DECLARE_Int32(warmup_cache_async_thread);
120
121
DECLARE_mInt32(delete_bitmap_lock_expiration_seconds);
122
123
DECLARE_mInt32(get_delete_bitmap_lock_max_retry_times);
124
125
DECLARE_mBool(enable_sync_tablet_delete_bitmap_by_cache);
126
// 1: write v1, 2: write v2, 3: double write v1 and v2
127
DECLARE_Int32(delete_bitmap_store_write_version);
128
// 1: read v1, 2: read v2, 3: double read v1 and v2
129
DECLARE_Int32(delete_bitmap_store_read_version);
130
// for store v2
131
DECLARE_mBool(enable_agg_delta_delete_bitmap_for_store_v2);
132
DECLARE_mInt64(delete_bitmap_store_v2_max_bytes_in_fdb);
133
DECLARE_Int32(sync_delete_bitmap_task_max_thread);
134
DECLARE_mBool(enable_delete_bitmap_store_v2_check_correctness);
135
136
DECLARE_mBool(enable_batch_get_delete_bitmap);
137
DECLARE_mInt64(get_delete_bitmap_bytes_threshold);
138
139
// Skip writing empty rowset metadata to meta service
140
DECLARE_mBool(skip_writing_empty_rowset_metadata);
141
142
// enable large txn lazy commit in meta-service `commit_txn`
143
DECLARE_mBool(enable_cloud_txn_lazy_commit);
144
145
DECLARE_mInt32(remove_expired_tablet_txn_info_interval_seconds);
146
147
DECLARE_mInt32(tablet_txn_info_min_expired_seconds);
148
149
DECLARE_mBool(enable_use_cloud_unique_id_from_fe);
150
151
DECLARE_Bool(enable_cloud_tablet_report);
152
153
DECLARE_mInt64(meta_service_rpc_reconnect_interval_ms);
154
155
DECLARE_mInt32(meta_service_conflict_error_retry_times);
156
157
DECLARE_Bool(enable_check_storage_vault);
158
159
DECLARE_mInt64(cloud_index_change_task_timeout_second);
160
161
DECLARE_mInt64(warmup_tablet_replica_info_cache_ttl_sec);
162
163
DECLARE_mInt64(warm_up_rowset_slow_log_ms);
164
165
DECLARE_mInt32(warm_up_manager_thread_pool_size);
166
167
// When event driven warm-up is enabled by the user, turning on this option can help
168
// avoid file cache misses in the read cluster caused by compaction.
169
// If enabled, compaction will wait for the warm-up to complete before committing.
170
//
171
// ATTN: Enabling this option may slow down compaction due to the added wait.
172
DECLARE_mBool(enable_compaction_delay_commit_for_warm_up);
173
174
DECLARE_mInt64(warm_up_rowset_sync_wait_min_timeout_ms);
175
176
DECLARE_mInt64(warm_up_rowset_sync_wait_max_timeout_ms);
177
178
DECLARE_mBool(enable_warmup_immediately_on_new_rowset);
179
180
// Packed file manager config
181
DECLARE_mBool(enable_packed_file);
182
DECLARE_mBool(enable_file_cache_write_index_file_only);
183
DECLARE_mInt64(packed_file_size_threshold_bytes);
184
DECLARE_mInt64(packed_file_time_threshold_ms);
185
DECLARE_mInt64(packed_file_try_lock_timeout_ms);
186
DECLARE_mInt64(packed_file_small_file_count_threshold);
187
DECLARE_mInt64(small_file_threshold_bytes);
188
DECLARE_mInt64(uploaded_file_retention_seconds);
189
DECLARE_mInt64(packed_file_cleanup_interval_seconds);
190
191
DECLARE_mBool(enable_standby_passive_compaction);
192
193
DECLARE_mDouble(standby_compaction_version_ratio);
194
195
// Compaction read-write separation: only the "last active" cluster (the one that most recently
196
// performed load) is allowed to compact a tablet
197
DECLARE_mBool(enable_compaction_rw_separation);
198
// Timeout in ms for takeover when last active cluster becomes unavailable (default 5 min)
199
DECLARE_mInt64(compaction_cluster_takeover_timeout_ms);
200
// Interval in seconds to refresh cluster status cache for compaction read-write separation
201
DECLARE_mInt64(cluster_status_cache_refresh_interval_sec);
202
// When version count exceeds this ratio of max_tablet_version_num, force compaction
203
// even on read-only clusters (safety valve to prevent unbounded version growth)
204
DECLARE_mDouble(compaction_rw_separation_version_threshold_ratio);
205
// Rate limit for warmup download in bytes per second, default 100MB/s
206
// <= 0 means no limit
207
DECLARE_mInt64(file_cache_warmup_download_rate_limit_bytes_per_second);
208
209
DECLARE_mInt64(peer_candidate_cleanup_interval_s);
210
DECLARE_mInt64(peer_candidate_expiry_s);
211
DECLARE_mInt32(peer_rpc_failure_eviction_threshold);
212
DECLARE_mInt32(peer_all_miss_cooldown_threshold);
213
DECLARE_mInt64(peer_all_miss_cooldown_duration_s);
214
215
DECLARE_mBool(enable_cache_read_from_peer);
216
217
DECLARE_mBool(enable_peer_s3_race);
218
DECLARE_mInt32(max_concurrent_peer_races);
219
// When > 0, S3 read is delayed by this many ms after peer bthread launch so peer gets a head
220
// start.  Useful in low-latency environments where peer is consistently faster than S3.
221
// Default 0 disables the delay (both paths launch simultaneously).
222
DECLARE_mInt32(peer_race_hedge_delay_ms);
223
DECLARE_mString(peer_cache_fill_compute_group_id);
224
DECLARE_mBool(enable_peer_server_cache_fill);
225
DECLARE_mInt32(peer_server_cache_fill_timeout_ms);
226
DECLARE_mInt32(max_concurrent_peer_server_fills);
227
// Reject queued peer fetch tasks that wait too long in the peer fetch pool.
228
DECLARE_mInt32(peer_fetch_queue_timeout_ms);
229
230
// Base compaction output: only write index files to file cache, not data files
231
DECLARE_mBool(enable_file_cache_write_base_compaction_index_only);
232
233
// Cumulative compaction output: only write index files to file cache, not data files
234
DECLARE_mBool(enable_file_cache_write_cumu_compaction_index_only);
235
236
// MS RPC rate limiting config
237
// Enable host-level rate limiting for MS RPCs to prevent burst traffic
238
DECLARE_mBool(enable_ms_rpc_host_level_rate_limit);
239
240
// Per-RPC QPS limit configs (per CPU core)
241
// QPS limit = config_value * num_cores
242
// Set to 0 to disable rate limiting for a specific RPC
243
// Set to -1 to use ms_rpc_qps_default config value
244
DECLARE_mInt32(ms_rpc_qps_default);
245
DECLARE_mInt32(ms_rpc_qps_get_tablet_meta);
246
DECLARE_mInt32(ms_rpc_qps_get_rowset);
247
DECLARE_mInt32(ms_rpc_qps_prepare_rowset);
248
DECLARE_mInt32(ms_rpc_qps_commit_rowset);
249
DECLARE_mInt32(ms_rpc_qps_update_tmp_rowset);
250
DECLARE_mInt32(ms_rpc_qps_commit_txn);
251
DECLARE_mInt32(ms_rpc_qps_abort_txn);
252
DECLARE_mInt32(ms_rpc_qps_precommit_txn);
253
DECLARE_mInt32(ms_rpc_qps_get_obj_store_info);
254
DECLARE_mInt32(ms_rpc_qps_start_tablet_job);
255
DECLARE_mInt32(ms_rpc_qps_finish_tablet_job);
256
DECLARE_mInt32(ms_rpc_qps_get_delete_bitmap);
257
DECLARE_mInt32(ms_rpc_qps_update_delete_bitmap);
258
DECLARE_mInt32(ms_rpc_qps_get_delete_bitmap_update_lock);
259
DECLARE_mInt32(ms_rpc_qps_remove_delete_bitmap_update_lock);
260
DECLARE_mInt32(ms_rpc_qps_get_instance);
261
DECLARE_mInt32(ms_rpc_qps_prepare_restore_job);
262
DECLARE_mInt32(ms_rpc_qps_commit_restore_job);
263
DECLARE_mInt32(ms_rpc_qps_finish_restore_job);
264
DECLARE_mInt32(ms_rpc_qps_list_snapshots);
265
DECLARE_mInt32(ms_rpc_qps_get_cluster_status);
266
DECLARE_mInt32(ms_rpc_qps_update_packed_file_info);
267
268
// ============== Table-level backpressure handling config ==============
269
270
// Enable MS backpressure response handling (table-level adaptive throttling)
271
DECLARE_mBool(enable_ms_backpressure_handling);
272
273
// Time window (seconds) for computing per-table QPS via bvar::PerSecond.
274
// Larger window smooths out short-term spikes; smaller window reacts faster.
275
// Immutable: takes effect only at counter creation time.
276
DECLARE_Int32(ms_rpc_table_qps_window_sec);
277
278
// ------------ Throttle upgrade config ------------
279
280
// Minimum interval between throttle upgrades after receiving MS_BUSY (milliseconds)
281
DECLARE_mInt32(ms_backpressure_upgrade_interval_ms);
282
283
// Number of top-k tables to throttle on each upgrade
284
DECLARE_mInt32(ms_backpressure_upgrade_top_k);
285
286
// QPS decay ratio when upgrading throttle
287
// New limit = current QPS * ratio (first time) or current limit * ratio (already limited)
288
DECLARE_mDouble(ms_backpressure_throttle_ratio);
289
290
// Floor value for table-level QPS limit
291
// Throttle upgrade will not reduce QPS limit below this value
292
DECLARE_mDouble(ms_rpc_table_qps_limit_floor);
293
294
// ------------ Throttle downgrade config ------------
295
296
// Time without MS_BUSY before triggering throttle downgrade (milliseconds)
297
DECLARE_mInt32(ms_backpressure_downgrade_interval_ms);
298
299
} // namespace doris::config