Skip to content

Commit 80a3b1a

Browse files
authored
Merge branch 'master' into show-columns-hide-version
2 parents a256adc + cf2d4de commit 80a3b1a

File tree

306 files changed

+15044
-7774
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

306 files changed

+15044
-7774
lines changed

.asf.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ github:
5050
- Clang Formatter
5151
- CheckStyle
5252
- P0 Regression (Doris Regression)
53-
- NonConcurrent Regression (Doris Regression)
53+
- NonConcurrent Regression (nonConcurrent)
5454
- External Regression (Doris External Regression)
5555
- cloud_p0 (Doris Cloud Regression)
5656
- vault_p0 (Doris Cloud Regression)
@@ -83,7 +83,7 @@ github:
8383
- Cloud UT (Doris Cloud UT)
8484
- COMPILE (DORIS_COMPILE)
8585
- P0 Regression (Doris Regression)
86-
- NonConcurrent Regression (Doris Regression)
86+
- NonConcurrent Regression (nonConcurrent)
8787
- External Regression (Doris External Regression)
8888
- cloud_p0 (Doris Cloud Regression)
8989
- vault_p0 (Doris Cloud Regression)
@@ -105,7 +105,7 @@ github:
105105
- Cloud UT (Doris Cloud UT)
106106
- COMPILE (DORIS_COMPILE)
107107
- P0 Regression (Doris Regression)
108-
- NonConcurrent Regression (Doris Regression)
108+
- NonConcurrent Regression (nonConcurrent)
109109
- External Regression (Doris External Regression)
110110
- cloud_p0 (Doris Cloud Regression)
111111
- vault_p0 (Doris Cloud Regression)
@@ -127,7 +127,7 @@ github:
127127
- Cloud UT (Doris Cloud UT)
128128
- COMPILE (DORIS_COMPILE)
129129
- P0 Regression (Doris Regression)
130-
- NonConcurrent Regression (Doris Regression)
130+
- NonConcurrent Regression (nonConcurrent)
131131
- External Regression (Doris External Regression)
132132
- cloud_p0 (Doris Cloud Regression)
133133
- vault_p0 (Doris Cloud Regression)

be/src/cloud/cloud_rowset_writer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ Status CloudRowsetWriter::init(const RowsetWriterContext& rowset_writer_context)
6161
_rowset_meta->set_newest_write_timestamp(_context.newest_write_timestamp);
6262
}
6363
_rowset_meta->set_tablet_schema(_context.tablet_schema);
64+
_rowset_meta->set_job_id(_context.job_id);
6465
_context.segment_collector = std::make_shared<SegmentCollectorT<BaseBetaRowsetWriter>>(this);
6566
_context.file_writer_creator = std::make_shared<FileWriterCreatorT<BaseBetaRowsetWriter>>(this);
6667
if (_context.mow_context != nullptr) {

be/src/cloud/cloud_schema_change_job.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,7 @@ Status CloudSchemaChangeJob::_convert_historical_rowsets(const SchemaChangeParam
326326
context.tablet_schema = _new_tablet->tablet_schema();
327327
context.newest_write_timestamp = rs_reader->newest_write_timestamp();
328328
context.storage_resource = _cloud_storage_engine.get_storage_resource(sc_params.vault_id);
329+
context.job_id = _job_id;
329330
context.write_file_cache = sc_params.output_to_file_cache;
330331
context.tablet = _new_tablet;
331332
if (!context.storage_resource) {

be/src/cloud/cloud_stream_load_executor.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,11 @@ Status CloudStreamLoadExecutor::operate_txn_2pc(StreamLoadContext* ctx) {
104104

105105
Status CloudStreamLoadExecutor::commit_txn(StreamLoadContext* ctx) {
106106
DBUG_EXECUTE_IF("StreamLoadExecutor.commit_txn.block", DBUG_BLOCK);
107+
DBUG_EXECUTE_IF("StreamLoadExecutor.commit_txn.crash", {
108+
LOG(INFO) << "debug point " << DP_NAME << " trigger crash";
109+
volatile int* p = nullptr;
110+
*p = 1;
111+
});
107112
// forward to fe to excute commit transaction for MoW table
108113
if (ctx->is_mow_table() || !config::enable_stream_load_commit_txn_on_be ||
109114
ctx->load_type == TLoadType::ROUTINE_LOAD) {

be/src/cloud/cloud_tablet_mgr.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include "common/status.h"
3030
#include "olap/lru_cache.h"
3131
#include "runtime/memory/cache_policy.h"
32+
#include "util/debug_points.h"
3233
#include "util/stack_util.h"
3334

3435
namespace doris {
@@ -148,7 +149,9 @@ CloudTabletMgr::CloudTabletMgr(CloudStorageEngine& engine)
148149
_tablet_map(std::make_unique<TabletMap>()),
149150
_cache(std::make_unique<LRUCachePolicy>(
150151
CachePolicy::CacheType::CLOUD_TABLET_CACHE, config::tablet_cache_capacity,
151-
LRUCacheType::NUMBER, 0, config::tablet_cache_shards, false /*enable_prune*/)) {}
152+
LRUCacheType::NUMBER, /*sweep time*/ 0, config::tablet_cache_shards,
153+
/*element_count_capacity*/ 0, /*enable_prune*/ false,
154+
/*is_lru_k*/ false)) {}
152155

153156
CloudTabletMgr::~CloudTabletMgr() = default;
154157

@@ -163,6 +166,7 @@ Result<std::shared_ptr<CloudTablet>> CloudTabletMgr::get_tablet(int64_t tablet_i
163166
SyncRowsetStats* sync_stats,
164167
bool force_use_only_cached,
165168
bool cache_on_miss) {
169+
DBUG_EXECUTE_IF("CloudTabletMgr::get_tablet.block", DBUG_BLOCK);
166170
// LRU value type. `Value`'s lifetime MUST NOT be longer than `CloudTabletMgr`
167171
class Value : public LRUCacheValueBase {
168172
public:

be/src/cloud/cloud_txn_delete_bitmap_cache.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ namespace doris {
3434

3535
CloudTxnDeleteBitmapCache::CloudTxnDeleteBitmapCache(size_t size_in_bytes)
3636
: LRUCachePolicy(CachePolicy::CacheType::CLOUD_TXN_DELETE_BITMAP_CACHE, size_in_bytes,
37-
LRUCacheType::SIZE, 86400, 4),
37+
LRUCacheType::SIZE, /*stale_sweep_time_s*/ 86400, /*num_shards*/ 4,
38+
/*element_count_capacity*/ 0, /*enable_prune*/ true,
39+
/*is_lru_k*/ false),
3840
_stop_latch(1) {}
3941

4042
CloudTxnDeleteBitmapCache::~CloudTxnDeleteBitmapCache() {

be/src/cloud/config.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ DEFINE_mBool(enable_cloud_tablet_report, "true");
110110

111111
DEFINE_mInt32(delete_bitmap_rpc_retry_times, "25");
112112

113-
DEFINE_mInt64(meta_service_rpc_reconnect_interval_ms, "5000");
113+
DEFINE_mInt64(meta_service_rpc_reconnect_interval_ms, "100");
114114

115115
DEFINE_mInt32(meta_service_conflict_error_retry_times, "10");
116116

be/src/cloud/injection_point_action.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,17 @@ void set_return_error(const std::string& point, HttpRequest* req) {
279279
HttpChannel::send_reply(req, HttpStatus::OK, "OK");
280280
}
281281

282+
void set_segfault(const std::string& point, HttpRequest* req) {
283+
auto sp = SyncPoint::get_instance();
284+
sp->set_call_back(point, [point](auto&&) {
285+
LOG(INFO) << "injection point hit, point=" << point << " trigger segfault";
286+
// Intentional null dereference to crash the BE for testing.
287+
volatile int* p = nullptr;
288+
*p = 1;
289+
});
290+
HttpChannel::send_reply(req, HttpStatus::OK, "OK");
291+
}
292+
282293
void handle_set(HttpRequest* req) {
283294
auto& point = req->param("name");
284295
if (point.empty()) {
@@ -302,6 +313,9 @@ void handle_set(HttpRequest* req) {
302313
} else if (behavior == "return_error") {
303314
set_return_error(point, req);
304315
return;
316+
} else if (behavior == "segfault") {
317+
set_segfault(point, req);
318+
return;
305319
}
306320
HttpChannel::send_reply(req, HttpStatus::BAD_REQUEST, "unknown behavior: " + behavior);
307321
}
@@ -377,13 +391,15 @@ InjectionPointAction::InjectionPointAction() = default;
377391
// which is an int, valid values can be found in status.h, e.g. -235 or -230,
378392
// if `code` is not present return Status::InternalError. Optional `probability`
379393
// determines the percentage of times to inject the error (default 100).
394+
// * segfault: dereference a null pointer to crash BE intentionally
380395
// ```
381396
// curl "be_ip:http_port/api/injection_point/set?name=${injection_point_name}&behavior=sleep&duration=${x_millsec}" # sleep x millisecs
382397
// curl "be_ip:http_port/api/injection_point/set?name=${injection_point_name}&behavior=return" # return void
383398
// curl "be_ip:http_port/api/injection_point/set?name=${injection_point_name}&behavior=return_ok" # return ok
384399
// curl "be_ip:http_port/api/injection_point/set?name=${injection_point_name}&behavior=return_error" # internal error
385400
// curl "be_ip:http_port/api/injection_point/set?name=${injection_point_name}&behavior=return_error&code=${code}" # -235
386401
// curl "be_ip:http_port/api/injection_point/set?name=${injection_point_name}&behavior=return_error&code=${code}&probability=50" # inject with 50% probability
402+
// curl "be_ip:http_port/api/injection_point/set?name=${injection_point_name}&behavior=segfault" # crash BE
387403
// ```
388404
void InjectionPointAction::handle(HttpRequest* req) {
389405
LOG(INFO) << "handle InjectionPointAction " << req->debug_string();

be/src/cloud/pb_convert.cpp

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,12 @@ void doris_rowset_meta_to_cloud(RowsetMetaCloudPB* out, const RowsetMetaPB& in)
105105
auto* slice_locations = out->mutable_packed_slice_locations();
106106
slice_locations->clear();
107107
slice_locations->insert(in.packed_slice_locations().begin(), in.packed_slice_locations().end());
108+
if (in.has_is_recycled()) {
109+
out->set_is_recycled(in.is_recycled());
110+
}
111+
if (in.has_job_id()) {
112+
out->set_job_id(in.job_id());
113+
}
108114
}
109115

110116
void doris_rowset_meta_to_cloud(RowsetMetaCloudPB* out, RowsetMetaPB&& in) {
@@ -177,6 +183,12 @@ void doris_rowset_meta_to_cloud(RowsetMetaCloudPB* out, RowsetMetaPB&& in) {
177183
auto* slice_locations = out->mutable_packed_slice_locations();
178184
slice_locations->clear();
179185
slice_locations->insert(in.packed_slice_locations().begin(), in.packed_slice_locations().end());
186+
if (in.has_is_recycled()) {
187+
out->set_is_recycled(in.is_recycled());
188+
}
189+
if (in.has_job_id()) {
190+
out->set_job_id(in.job_id());
191+
}
180192
}
181193

182194
RowsetMetaPB cloud_rowset_meta_to_doris(const RowsetMetaCloudPB& in) {
@@ -259,6 +271,12 @@ void cloud_rowset_meta_to_doris(RowsetMetaPB* out, const RowsetMetaCloudPB& in)
259271
auto* slice_locations = out->mutable_packed_slice_locations();
260272
slice_locations->clear();
261273
slice_locations->insert(in.packed_slice_locations().begin(), in.packed_slice_locations().end());
274+
if (in.has_is_recycled()) {
275+
out->set_is_recycled(in.is_recycled());
276+
}
277+
if (in.has_job_id()) {
278+
out->set_job_id(in.job_id());
279+
}
262280
}
263281

264282
void cloud_rowset_meta_to_doris(RowsetMetaPB* out, RowsetMetaCloudPB&& in) {
@@ -330,6 +348,12 @@ void cloud_rowset_meta_to_doris(RowsetMetaPB* out, RowsetMetaCloudPB&& in) {
330348
auto* slice_locations = out->mutable_packed_slice_locations();
331349
slice_locations->clear();
332350
slice_locations->insert(in.packed_slice_locations().begin(), in.packed_slice_locations().end());
351+
if (in.has_is_recycled()) {
352+
out->set_is_recycled(in.is_recycled());
353+
}
354+
if (in.has_job_id()) {
355+
out->set_job_id(in.job_id());
356+
}
333357
}
334358

335359
TabletSchemaCloudPB doris_tablet_schema_to_cloud(const TabletSchemaPB& in) {

be/src/common/config.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ DEFINE_Int32(task_executor_max_concurrency_per_task, "-1");
308308
DEFINE_Int32(task_executor_initial_max_concurrency_per_task, "-1");
309309

310310
// Enable task executor in internal table scan.
311-
DEFINE_Bool(enable_task_executor_in_internal_table, "false");
311+
DEFINE_Bool(enable_task_executor_in_internal_table, "true");
312312
// Enable task executor in external table scan.
313313
DEFINE_Bool(enable_task_executor_in_external_table, "true");
314314

0 commit comments

Comments
 (0)