Coverage Report

Created: 2026-10-21 22:56

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.0M
static inline bool is_cloud_mode() {
29
11.0M
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
11.0M
}
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.85M
static inline bool is_cloud_mode() {
29
1.85M
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
1.85M
}
config.cpp:_ZN5doris6configL13is_cloud_modeEv
Line
Count
Source
28
18
static inline bool is_cloud_mode() {
29
18
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
18
}
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_8_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
Line
Count
Source
28
26.7k
static inline bool is_cloud_mode() {
29
26.7k
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
26.7k
}
Unexecuted instantiation: unity_6_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
unity_13_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
Line
Count
Source
28
2.48M
static inline bool is_cloud_mode() {
29
2.49M
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
2.48M
}
Unexecuted instantiation: unity_11_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
unity_10_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
Line
Count
Source
28
496k
static inline bool is_cloud_mode() {
29
497k
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
496k
}
unity_5_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
Line
Count
Source
28
2.92M
static inline bool is_cloud_mode() {
29
2.92M
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
2.92M
}
unity_2_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
Line
Count
Source
28
398k
static inline bool is_cloud_mode() {
29
398k
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
398k
}
unity_4_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
Line
Count
Source
28
799
static inline bool is_cloud_mode() {
29
799
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
799
}
Unexecuted instantiation: operator.cpp:_ZN5doris6configL13is_cloud_modeEv
unity_3_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
Line
Count
Source
28
6.69k
static inline bool is_cloud_mode() {
29
6.69k
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
6.69k
}
unity_26_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
Line
Count
Source
28
62.7k
static inline bool is_cloud_mode() {
29
62.7k
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
62.7k
}
unity_25_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
Line
Count
Source
28
7.01k
static inline bool is_cloud_mode() {
29
7.01k
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
7.01k
}
unity_24_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
Line
Count
Source
28
23.1k
static inline bool is_cloud_mode() {
29
23.1k
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
23.1k
}
Unexecuted instantiation: unity_23_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
unity_22_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
Line
Count
Source
28
1.44M
static inline bool is_cloud_mode() {
29
1.44M
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
1.44M
}
Unexecuted instantiation: unity_21_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
unity_20_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
Line
Count
Source
28
2
static inline bool is_cloud_mode() {
29
2
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
2
}
unity_19_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
Line
Count
Source
28
62
static inline bool is_cloud_mode() {
29
62
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
62
}
unity_18_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
Line
Count
Source
28
31.5k
static inline bool is_cloud_mode() {
29
31.5k
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
31.5k
}
unity_17_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
Line
Count
Source
28
1.25M
static inline bool is_cloud_mode() {
29
1.25M
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
1.25M
}
unity_16_cxx.cxx:_ZN5doris6configL13is_cloud_modeEv
Line
Count
Source
28
855
static inline bool is_cloud_mode() {
29
855
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
855
}
Unexecuted instantiation: 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
point_query_executor.cpp:_ZN5doris6configL13is_cloud_modeEv
Line
Count
Source
28
532
static inline bool is_cloud_mode() {
29
532
    return deploy_mode == "cloud" || !cloud_unique_id.empty();
30
532
}
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: internal_service.cpp:_ZN5doris6configL13is_cloud_modeEv
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(changelog_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_mInt64(warm_up_rowset_state_gc_grace_period_seconds);
107
DECLARE_mInt32(schedule_sync_tablets_interval_s);
108
109
// Cloud mow
110
DECLARE_mInt32(mow_stream_load_commit_retry_times);
111
112
DECLARE_mBool(save_load_error_log_to_s3);
113
114
// Whether to use public endpoint for error log presigned URL
115
DECLARE_mBool(use_public_endpoint_for_error_log);
116
117
// the theads which sync the datas which loaded in other clusters
118
DECLARE_mInt32(sync_load_for_tablets_thread);
119
120
DECLARE_Int32(warmup_cache_async_thread);
121
122
DECLARE_mInt32(delete_bitmap_lock_expiration_seconds);
123
124
DECLARE_mInt32(get_delete_bitmap_lock_max_retry_times);
125
126
DECLARE_mBool(enable_sync_tablet_delete_bitmap_by_cache);
127
// 1: write v1, 2: write v2, 3: double write v1 and v2
128
DECLARE_Int32(delete_bitmap_store_write_version);
129
// 1: read v1, 2: read v2, 3: double read v1 and v2
130
DECLARE_Int32(delete_bitmap_store_read_version);
131
// for store v2
132
DECLARE_mBool(enable_agg_delta_delete_bitmap_for_store_v2);
133
DECLARE_mInt64(delete_bitmap_store_v2_max_bytes_in_fdb);
134
DECLARE_Int32(sync_delete_bitmap_task_max_thread);
135
DECLARE_mBool(enable_delete_bitmap_store_v2_check_correctness);
136
137
DECLARE_mBool(enable_batch_get_delete_bitmap);
138
DECLARE_mInt64(get_delete_bitmap_bytes_threshold);
139
140
// Skip writing empty rowset metadata to meta service
141
DECLARE_mBool(skip_writing_empty_rowset_metadata);
142
143
// enable large txn lazy commit in meta-service `commit_txn`
144
DECLARE_mBool(enable_cloud_txn_lazy_commit);
145
146
DECLARE_mInt32(remove_expired_tablet_txn_info_interval_seconds);
147
148
DECLARE_mInt32(tablet_txn_info_min_expired_seconds);
149
150
DECLARE_mBool(enable_use_cloud_unique_id_from_fe);
151
152
DECLARE_Bool(enable_cloud_tablet_report);
153
154
DECLARE_mInt64(meta_service_rpc_reconnect_interval_ms);
155
156
DECLARE_mInt32(meta_service_conflict_error_retry_times);
157
158
DECLARE_Bool(enable_check_storage_vault);
159
160
DECLARE_mInt64(cloud_index_change_task_timeout_second);
161
162
DECLARE_mInt64(warmup_tablet_replica_info_cache_ttl_sec);
163
164
DECLARE_mInt64(warm_up_rowset_slow_log_ms);
165
166
DECLARE_mInt32(warm_up_manager_thread_pool_size);
167
168
// When event driven warm-up is enabled by the user, turning on this option can help
169
// avoid file cache misses in the read cluster caused by compaction.
170
// If enabled, compaction will wait for the warm-up to complete before committing.
171
//
172
// ATTN: Enabling this option may slow down compaction due to the added wait.
173
DECLARE_mBool(enable_compaction_delay_commit_for_warm_up);
174
175
DECLARE_mInt64(warm_up_rowset_sync_wait_min_timeout_ms);
176
177
DECLARE_mInt64(warm_up_rowset_sync_wait_max_timeout_ms);
178
179
DECLARE_mBool(enable_warmup_immediately_on_new_rowset);
180
181
// Packed file manager config
182
DECLARE_mBool(enable_packed_file);
183
DECLARE_mBool(enable_file_cache_write_index_file_only);
184
DECLARE_mInt64(packed_file_size_threshold_bytes);
185
DECLARE_mInt64(packed_file_time_threshold_ms);
186
DECLARE_mInt64(packed_file_try_lock_timeout_ms);
187
DECLARE_mInt64(packed_file_small_file_count_threshold);
188
DECLARE_mInt64(small_file_threshold_bytes);
189
DECLARE_mInt64(uploaded_file_retention_seconds);
190
DECLARE_mInt64(packed_file_cleanup_interval_seconds);
191
192
DECLARE_mBool(enable_standby_passive_compaction);
193
194
DECLARE_mDouble(standby_compaction_version_ratio);
195
196
// Compaction read-write separation: only the "last active" cluster (the one that most recently
197
// performed load) is allowed to compact a tablet
198
DECLARE_mBool(enable_compaction_rw_separation);
199
// Timeout in ms for takeover when last active cluster becomes unavailable (default 5 min)
200
DECLARE_mInt64(compaction_cluster_takeover_timeout_ms);
201
// Interval in seconds to refresh cluster status cache for compaction read-write separation
202
DECLARE_mInt64(cluster_status_cache_refresh_interval_sec);
203
// When version count exceeds this ratio of max_tablet_version_num, force compaction
204
// even on read-only clusters (safety valve to prevent unbounded version growth)
205
DECLARE_mDouble(compaction_rw_separation_version_threshold_ratio);
206
// Rate limit for warmup download in bytes per second, default 100MB/s
207
// <= 0 means no limit
208
DECLARE_mInt64(file_cache_warmup_download_rate_limit_bytes_per_second);
209
210
DECLARE_mInt64(peer_candidate_cleanup_interval_s);
211
DECLARE_mInt64(peer_candidate_expiry_s);
212
DECLARE_mInt32(peer_rpc_failure_eviction_threshold);
213
// Address-level circuit breaker shared by peer reads across tablets.
214
DECLARE_mInt32(cache_peer_read_failure_threshold);
215
DECLARE_mInt32(cache_peer_read_circuit_open_seconds);
216
DECLARE_mInt32(peer_all_miss_cooldown_threshold);
217
DECLARE_mInt64(peer_all_miss_cooldown_duration_s);
218
219
DECLARE_mBool(enable_cache_read_from_peer);
220
221
DECLARE_mBool(enable_peer_s3_race);
222
DECLARE_mInt32(max_concurrent_peer_races);
223
// When > 0, S3 read is delayed by this many ms after peer bthread launch so peer gets a head
224
// start.  Useful in low-latency environments where peer is consistently faster than S3.
225
// Default 0 disables the delay (both paths launch simultaneously).
226
DECLARE_mInt32(peer_race_hedge_delay_ms);
227
DECLARE_mString(peer_cache_fill_compute_group_id);
228
DECLARE_mBool(enable_peer_server_cache_fill);
229
DECLARE_mInt32(peer_server_cache_fill_timeout_ms);
230
DECLARE_mInt32(max_concurrent_peer_server_fills);
231
// Reject queued peer fetch tasks that wait too long in the peer fetch pool.
232
DECLARE_mInt32(peer_fetch_queue_timeout_ms);
233
234
// Base compaction output: only write index files to file cache, not data files
235
DECLARE_mBool(enable_file_cache_write_base_compaction_index_only);
236
237
// Cumulative compaction output: only write index files to file cache, not data files
238
DECLARE_mBool(enable_file_cache_write_cumu_compaction_index_only);
239
240
// MS RPC rate limiting config
241
// Enable host-level rate limiting for MS RPCs to prevent burst traffic
242
DECLARE_mBool(enable_ms_rpc_host_level_rate_limit);
243
// Evaluate and record host-level MS RPC rate limits without delaying requests.
244
// Dry-run evaluation is independent of enable_ms_rpc_host_level_rate_limit.
245
// When both are enabled, dry-run takes precedence and requests are not delayed.
246
DECLARE_mBool(enable_ms_rpc_host_level_rate_limit_dry_run);
247
248
// Per-RPC QPS limit configs (per CPU core)
249
// QPS limit = config_value * num_cores
250
// Set to 0 to disable rate limiting for a specific RPC
251
// Set to -1 to use ms_rpc_qps_default config value
252
DECLARE_mInt32(ms_rpc_qps_default);
253
DECLARE_mInt32(ms_rpc_qps_get_tablet_meta);
254
DECLARE_mInt32(ms_rpc_qps_get_rowset);
255
DECLARE_mInt32(ms_rpc_qps_prepare_rowset);
256
DECLARE_mInt32(ms_rpc_qps_commit_rowset);
257
DECLARE_mInt32(ms_rpc_qps_update_tmp_rowset);
258
DECLARE_mInt32(ms_rpc_qps_commit_txn);
259
DECLARE_mInt32(ms_rpc_qps_abort_txn);
260
DECLARE_mInt32(ms_rpc_qps_precommit_txn);
261
DECLARE_mInt32(ms_rpc_qps_get_obj_store_info);
262
DECLARE_mInt32(ms_rpc_qps_start_tablet_job);
263
DECLARE_mInt32(ms_rpc_qps_finish_tablet_job);
264
DECLARE_mInt32(ms_rpc_qps_get_delete_bitmap);
265
DECLARE_mInt32(ms_rpc_qps_update_delete_bitmap);
266
DECLARE_mInt32(ms_rpc_qps_get_delete_bitmap_update_lock);
267
DECLARE_mInt32(ms_rpc_qps_remove_delete_bitmap_update_lock);
268
DECLARE_mInt32(ms_rpc_qps_get_instance);
269
DECLARE_mInt32(ms_rpc_qps_prepare_restore_job);
270
DECLARE_mInt32(ms_rpc_qps_commit_restore_job);
271
DECLARE_mInt32(ms_rpc_qps_finish_restore_job);
272
DECLARE_mInt32(ms_rpc_qps_list_snapshots);
273
DECLARE_mInt32(ms_rpc_qps_get_cluster_status);
274
DECLARE_mInt32(ms_rpc_qps_update_packed_file_info);
275
276
// ============== Table-level backpressure handling config ==============
277
278
// Enable MS backpressure response handling (table-level adaptive throttling)
279
DECLARE_mBool(enable_ms_backpressure_handling);
280
// Evaluate and record table-level adaptive throttling without delaying requests.
281
// Dry-run evaluation is independent of enable_ms_backpressure_handling.
282
// When both are enabled, dry-run takes precedence and requests are not delayed.
283
DECLARE_mBool(enable_ms_backpressure_handling_dry_run);
284
285
// Time window (seconds) for computing per-table QPS via bvar::PerSecond.
286
// Larger window smooths out short-term spikes; smaller window reacts faster.
287
// Immutable: takes effect only at counter creation time.
288
DECLARE_Int32(ms_rpc_table_qps_window_sec);
289
290
// ------------ Throttle upgrade config ------------
291
292
// Minimum interval between throttle upgrades after receiving MS_BUSY (milliseconds)
293
DECLARE_mInt32(ms_backpressure_upgrade_interval_ms);
294
295
// Number of top-k tables to throttle on each upgrade
296
DECLARE_mInt32(ms_backpressure_upgrade_top_k);
297
298
// QPS decay ratio when upgrading throttle
299
// New limit = current QPS * ratio (first time) or current limit * ratio (already limited)
300
DECLARE_mDouble(ms_backpressure_throttle_ratio);
301
302
// Floor value for table-level QPS limit
303
// Throttle upgrade will not reduce QPS limit below this value
304
DECLARE_mDouble(ms_rpc_table_qps_limit_floor);
305
306
// ------------ Throttle downgrade config ------------
307
308
// Time without MS_BUSY before triggering throttle downgrade (milliseconds)
309
DECLARE_mInt32(ms_backpressure_downgrade_interval_ms);
310
311
} // namespace doris::config