Skip to content

Commit a97bb6b

Browse files
committed
1
1 parent ad1ad7f commit a97bb6b

File tree

2,259 files changed

+147983
-54392
lines changed

Some content is hidden

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

2,259 files changed

+147983
-54392
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#codeowners-syntax
2020

2121
be/src/io/ @gavinchou @dataroaring
22-
be/src/agent/be_exec_version_manager.cpp @BiteTheDDDDt
22+
be/src/agent/be_exec_version_manager.cpp @BiteTheDDDDt @zclllyybb
2323
fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java @dataroaring @CalvinKirs @morningman
2424
**/pom.xml @CalvinKirs @morningman
2525
fe/fe-common/src/main/java/org/apache/doris/common/FeMetaVersion.java @dataroaring @morningman @yiguolei @xiaokang
@@ -37,3 +37,5 @@ gensrc/proto/olap_file.proto @gavinchou @dataroaring @yiguolei
3737
gensrc/proto/cloud.proto @gavinchou @dataroaring @w41ter
3838
fe/fe-core/src/main/java/org/apache/doris/fs @CalvinKirs
3939
fe/fe-core/src/main/java/org/apache/doris/fsv2 @CalvinKirs
40+
be/src/vec/functions @zclllyybb
41+
be/**/CMakeLists.txt @zclllyybb @BiteTheDDDDt

.licenserc.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ header:
2828
- "**/apache-orc/**"
2929
- "**/glibc-compatibility/**"
3030
- "**/gutil/**"
31+
- "**/go.sum"
3132
- "**/test_data/**"
3233
- "**/jmockit/**"
3334
- "**/*.json"

be/benchmark/benchmark_bits.hpp

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
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+
#include <benchmark/benchmark.h>
19+
20+
#include "util/simd/bits.h"
21+
22+
namespace doris {} // namespace doris
23+
24+
static void BM_Bits_CountZeroNum(benchmark::State& state) {
25+
const auto n = static_cast<size_t>(state.range(0));
26+
std::vector<int8_t> data(n, 0);
27+
28+
for (auto _ : state) {
29+
auto r = doris::simd::count_zero_num<size_t>(data.data(), data.size());
30+
benchmark::DoNotOptimize(r);
31+
}
32+
33+
state.SetBytesProcessed(state.iterations() * n);
34+
}
35+
36+
static void BM_Bits_CountZeroNumNullMap(benchmark::State& state) {
37+
const auto n = static_cast<size_t>(state.range(0));
38+
std::vector<int8_t> data(n, 0);
39+
std::vector<uint8_t> null_map(n, 0);
40+
41+
for (auto _ : state) {
42+
auto r = doris::simd::count_zero_num<size_t>(data.data(), null_map.data(), data.size());
43+
benchmark::DoNotOptimize(r);
44+
}
45+
46+
state.SetBytesProcessed(state.iterations() * n);
47+
}
48+
49+
BENCHMARK(BM_Bits_CountZeroNum)
50+
->Unit(benchmark::kNanosecond)
51+
->Arg(16) // 16 bytes
52+
->Arg(32) // 32 bytes
53+
->Arg(64) // 64 bytes
54+
->Arg(256) // 256 bytes
55+
->Arg(1024) // 1KB
56+
->Repetitions(5)
57+
->DisplayAggregatesOnly();
58+
59+
BENCHMARK(BM_Bits_CountZeroNumNullMap)
60+
->Unit(benchmark::kNanosecond)
61+
->Arg(16) // 16 bytes
62+
->Arg(32) // 32 bytes
63+
->Arg(64) // 64 bytes
64+
->Arg(256) // 256 bytes
65+
->Arg(1024) // 1KB
66+
->Repetitions(5)
67+
->DisplayAggregatesOnly();

be/benchmark/benchmark_main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <benchmark/benchmark.h>
1919

2020
#include "benchmark_bit_pack.hpp"
21+
#include "benchmark_bits.hpp"
2122
#include "benchmark_block_bloom_filter.hpp"
2223
#include "benchmark_fastunion.hpp"
2324
#include "benchmark_hll_merge.hpp"

be/cmake/thirdparty.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ add_thirdparty(curl)
6868
add_thirdparty(lz4)
6969
add_thirdparty(thrift)
7070
add_thirdparty(thriftnb)
71+
add_thirdparty(crc32c)
7172

7273
add_thirdparty(libevent_core LIBNAME "lib/libevent_core.a")
7374
add_thirdparty(libevent_openssl LIBNAME "lib/libevent_openssl.a")

be/src/agent/cgroup_cpu_ctl.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ Status CgroupCpuCtl::delete_unused_cgroup_path(std::set<uint64_t>& used_wg_ids)
292292
std::string wg_path = query_path + unused_wg_id;
293293
int ret = rmdir(wg_path.c_str());
294294
if (ret < 0) {
295-
LOG(WARNING) << "rmdir failed, path=" << wg_path;
295+
LOG(WARNING) << "remove cgroup path failed, path=" << wg_path << ", error=" << ret;
296296
failed_count++;
297297
}
298298
}
@@ -317,7 +317,8 @@ Status CgroupV1CpuCtl::init() {
317317
if (access(_cgroup_v1_cpu_tg_path.c_str(), F_OK) != 0) {
318318
int ret = mkdir(_cgroup_v1_cpu_tg_path.c_str(), S_IRWXU);
319319
if (ret != 0) {
320-
LOG(ERROR) << "cgroup v1 mkdir workload group failed, path=" << _cgroup_v1_cpu_tg_path;
320+
LOG(WARNING) << "cgroup v1 make workload group dir failed, path="
321+
<< _cgroup_v1_cpu_tg_path << ", error=" << ret;
321322
return Status::InternalError<false>("cgroup v1 mkdir workload group failed, path={}",
322323
_cgroup_v1_cpu_tg_path);
323324
}
@@ -382,6 +383,8 @@ Status CgroupV2CpuCtl::init() {
382383
if (access(_cgroup_v2_query_wg_path.c_str(), F_OK) != 0) {
383384
int ret = mkdir(_cgroup_v2_query_wg_path.c_str(), S_IRWXU);
384385
if (ret != 0) {
386+
LOG(WARNING) << "cgroup v2 make workload group dir failed, path="
387+
<< _cgroup_v2_query_wg_path << ", error=" << ret;
385388
return Status::InternalError<false>("cgroup v2 mkdir wg failed, path={}",
386389
_cgroup_v2_query_wg_path);
387390
}

be/src/agent/task_worker_pool.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,6 @@ bool register_task_info(const TTaskType::type task_type, int64_t signature) {
124124
// no need to report task of these types
125125
return true;
126126
}
127-
if (task_type == TTaskType::type::DROP && config::is_cloud_mode()) {
128-
// cloud no need to report drop task status
129-
return true;
130-
}
131127

132128
if (signature == -1) { // No need to report task with unintialized signature
133129
return true;
@@ -1874,6 +1870,8 @@ void drop_tablet_callback(StorageEngine& engine, const TAgentTaskRequest& req) {
18741870

18751871
void drop_tablet_callback(CloudStorageEngine& engine, const TAgentTaskRequest& req) {
18761872
const auto& drop_tablet_req = req.drop_tablet_req;
1873+
// here drop_tablet_req.tablet_id is the signature of the task, see DropReplicaTask in fe
1874+
Defer defer = [&] { remove_task_info(req.task_type, req.signature); };
18771875
DBUG_EXECUTE_IF("WorkPoolCloudDropTablet.drop_tablet_callback.failed", {
18781876
LOG_WARNING("WorkPoolCloudDropTablet.drop_tablet_callback.failed")
18791877
.tag("tablet_id", drop_tablet_req.tablet_id);

be/src/cloud/cloud_base_compaction.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ Status CloudBaseCompaction::pick_rowsets_to_compact() {
226226
<< ", num_cumulative_rowsets=" << _input_rowsets.size() - 1
227227
<< ", base_compaction_num_cumulative_rowsets="
228228
<< config::base_compaction_min_rowset_num;
229+
apply_txn_size_truncation_and_log("CloudBaseCompaction");
229230
return Status::OK();
230231
}
231232

@@ -251,6 +252,7 @@ Status CloudBaseCompaction::pick_rowsets_to_compact() {
251252
<< ", base_size=" << base_size
252253
<< ", cumulative_base_ratio=" << cumulative_base_ratio
253254
<< ", policy_ratio=" << base_cumulative_delta_ratio;
255+
apply_txn_size_truncation_and_log("CloudBaseCompaction");
254256
return Status::OK();
255257
}
256258

@@ -263,6 +265,7 @@ Status CloudBaseCompaction::pick_rowsets_to_compact() {
263265
<< ", interval_since_last_base_compaction="
264266
<< interval_since_last_base_compaction
265267
<< ", interval_threshold=" << interval_threshold;
268+
apply_txn_size_truncation_and_log("CloudBaseCompaction");
266269
return Status::OK();
267270
}
268271

be/src/cloud/cloud_cumulative_compaction.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ Status CloudCumulativeCompaction::modify_rowsets() {
375375
if (_input_rowsets.size() == 1) {
376376
DCHECK_EQ(_output_rowset->version(), _input_rowsets[0]->version());
377377
// MUST NOT move input rowset to stale path
378-
cloud_tablet()->add_rowsets({_output_rowset}, true, wrlock);
378+
cloud_tablet()->add_rowsets({_output_rowset}, true, wrlock, true);
379379
} else {
380380
cloud_tablet()->delete_rowsets(_input_rowsets, wrlock);
381381
cloud_tablet()->add_rowsets({_output_rowset}, false, wrlock);
@@ -532,6 +532,8 @@ Status CloudCumulativeCompaction::pick_rowsets_to_compact() {
532532
return Status::Error<CUMULATIVE_NO_SUITABLE_VERSION>(
533533
"no suitable versions: only one rowset and not overlapping");
534534
}
535+
536+
apply_txn_size_truncation_and_log("CloudCumulativeCompaction");
535537
return Status::OK();
536538
}
537539

be/src/cloud/cloud_index_change_compaction.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ Status CloudIndexChangeCompaction::prepare_compact() {
6969

7070
_input_rowsets.push_back(input_rowset);
7171

72+
// Apply transaction size truncation (usually only 1 rowset for index change)
73+
int64_t kept_size = 0;
74+
int64_t truncated_size = 0;
75+
cloud::truncate_rowsets_by_txn_size(_input_rowsets, kept_size, truncated_size);
76+
7277
for (auto& rs : _input_rowsets) {
7378
_input_row_num += rs->num_rows();
7479
_input_segments += rs->num_segments();
@@ -473,4 +478,4 @@ Status CloudIndexChangeCompaction::garbage_collection() {
473478
return st;
474479
}
475480

476-
} // namespace doris
481+
} // namespace doris

0 commit comments

Comments
 (0)