Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement](Wal)Support dynamic wal space limit #27726

Merged

Conversation

Yukang-Lian
Copy link
Collaborator

@Yukang-Lian Yukang-Lian commented Nov 28, 2023

Proposed changes

Issue Number: close #xxx

User settings come in two scenarios: the first involves a percentage of disk space, while the second entails a fixed value.

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

@Yukang-Lian
Copy link
Collaborator Author

run buildall

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

return Thread::create(
"WalMgr", "replay_wal", [this]() { static_cast<void>(this->replay()); },
&_replay_thread);
}

Status WalManager::init_wal_limit(size_t available_bytes) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: method 'init_wal_limit' can be made static [readability-convert-member-functions-to-static]

be/src/olap/wal_manager.h:75:

-     Status init_wal_limit(size_t available_bytes);
+     static Status init_wal_limit(size_t available_bytes);

@@ -15,9 +15,12 @@
// specific language governing permissions and limitations
// under the License.

#pragma once

#include <gen_cpp/PaloInternalService_types.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: 'gen_cpp/PaloInternalService_types.h' file not found [clang-diagnostic-error]

#include <gen_cpp/PaloInternalService_types.h>
         ^

@Yukang-Lian
Copy link
Collaborator Author

run buildall

@doris-robot
Copy link

TPC-H test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
Tpch sf100 test result on commit b6418cc746d1c4dda484e892da9cfd46a68ff315, data reload: false

run tpch-sf100 query with default conf and session variables
q1	4941	4664	4670	4664
q2	351	174	153	153
q3	1511	1296	1292	1292
q4	1159	1043	957	957
q5	3262	3267	3224	3224
q6	255	134	133	133
q7	1036	518	550	518
q8	2231	2241	2221	2221
q9	6967	6956	6933	6933
q10	3295	3365	3354	3354
q11	334	212	209	209
q12	352	217	224	217
q13	4632	3911	3861	3861
q14	250	219	218	218
q15	587	534	519	519
q16	423	404	399	399
q17	1038	651	642	642
q18	7938	7406	7406	7406
q19	1551	1566	1532	1532
q20	562	314	296	296
q21	3401	2992	2965	2965
q22	368	295	304	295
Total cold run time: 46444 ms
Total hot run time: 42008 ms

run tpch-sf100 query with default conf and set session variable runtime_filter_mode=off
q1	4601	4594	4578	4578
q2	315	191	228	191
q3	3748	3749	3745	3745
q4	2516	2518	2495	2495
q5	6181	6186	6175	6175
q6	245	126	127	126
q7	2668	2002	1947	1947
q8	3681	3716	3700	3700
q9	9377	9287	9366	9287
q10	4060	4144	4149	4144
q11	670	492	494	492
q12	812	632	617	617
q13	4363	3630	3597	3597
q14	291	250	246	246
q15	596	521	528	521
q16	524	493	486	486
q17	2111	2052	2076	2052
q18	9552	8925	9021	8925
q19	1811	1770	1758	1758
q20	2305	1981	1980	1980
q21	7216	7152	7176	7152
q22	644	545	555	545
Total cold run time: 68287 ms
Total hot run time: 64759 ms

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 47.13 seconds
stream load tsv: 569 seconds loaded 74807831229 Bytes, about 125 MB/s
stream load json: 27 seconds loaded 2358488459 Bytes, about 83 MB/s
stream load orc: 68 seconds loaded 1101869774 Bytes, about 15 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 29.0 seconds inserted 10000000 Rows, about 344K ops/s
storage size: 17098848859 Bytes

@Yukang-Lian Yukang-Lian force-pushed the Support_Dynamic_Wal_Space_Limit branch from b6418cc to 8bbd350 Compare November 29, 2023 02:48
@Yukang-Lian
Copy link
Collaborator Author

run buildall

@Yukang-Lian Yukang-Lian force-pushed the Support_Dynamic_Wal_Space_Limit branch from 8bbd350 to 983ec1e Compare November 29, 2023 06:01
@Yukang-Lian
Copy link
Collaborator Author

run buildall

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

return Thread::create(
"WalMgr", "replay_wal", [this]() { static_cast<void>(this->replay()); },
&_replay_thread);
}

Status WalManager::init_wal_limit() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: method 'init_wal_limit' can be made static [readability-convert-member-functions-to-static]

be/src/olap/wal_manager.h:75:

-     Status init_wal_limit();
+     static Status init_wal_limit();

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 43.74 seconds
stream load tsv: 570 seconds loaded 74807831229 Bytes, about 125 MB/s
stream load json: 18 seconds loaded 2358488459 Bytes, about 124 MB/s
stream load orc: 65 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 29.1 seconds inserted 10000000 Rows, about 343K ops/s
storage size: 17099258544 Bytes

@Yukang-Lian
Copy link
Collaborator Author

run buildall

1 similar comment
@Yukang-Lian
Copy link
Collaborator Author

run buildall

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 43.55 seconds
stream load tsv: 556 seconds loaded 74807831229 Bytes, about 128 MB/s
stream load json: 18 seconds loaded 2358488459 Bytes, about 124 MB/s
stream load orc: 64 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 28.7 seconds inserted 10000000 Rows, about 348K ops/s
storage size: 17162408865 Bytes

@Yukang-Lian Yukang-Lian force-pushed the Support_Dynamic_Wal_Space_Limit branch from cda0136 to 5e2495f Compare November 29, 2023 14:04
@Yukang-Lian
Copy link
Collaborator Author

run buildall

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 44.2 seconds
stream load tsv: 564 seconds loaded 74807831229 Bytes, about 126 MB/s
stream load json: 18 seconds loaded 2358488459 Bytes, about 124 MB/s
stream load orc: 65 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 28.8 seconds inserted 10000000 Rows, about 347K ops/s
storage size: 17100160776 Bytes

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

@@ -123,4 +124,95 @@ TEST_F(WalManagerTest, recovery_normal) {
ASSERT_TRUE(!std::filesystem::exists(wal_200));
ASSERT_TRUE(!std::filesystem::exists(wal_201));
}

TEST_F(WalManagerTest, TestDynamicWalSpaceLimt) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: function 'TEST_F' exceeds recommended size/complexity thresholds [readability-function-size]

TEST_F(WalManagerTest, TestDynamicWalSpaceLimt) {
^
Additional context

be/test/olap/wal_manager_test.cpp:127: 89 lines including whitespace and comments (threshold 80)

TEST_F(WalManagerTest, TestDynamicWalSpaceLimt) {
^

@Yukang-Lian
Copy link
Collaborator Author

run buildall

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

}

// Just used for ut.
Status WalManager::init_wal_limit(size_t available_bytes) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: method 'init_wal_limit' can be made static [readability-convert-member-functions-to-static]

be/src/olap/wal_manager.h:77:

-     Status init_wal_limit(size_t available_bytes);
+     static Status init_wal_limit(size_t available_bytes);

@@ -123,4 +124,91 @@ TEST_F(WalManagerTest, recovery_normal) {
ASSERT_TRUE(!std::filesystem::exists(wal_200));
ASSERT_TRUE(!std::filesystem::exists(wal_201));
}

TEST_F(WalManagerTest, TestDynamicWalSpaceLimt) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: function 'TEST_F' exceeds recommended size/complexity thresholds [readability-function-size]

TEST_F(WalManagerTest, TestDynamicWalSpaceLimt) {
^
Additional context

be/test/olap/wal_manager_test.cpp:127: 85 lines including whitespace and comments (threshold 80)

TEST_F(WalManagerTest, TestDynamicWalSpaceLimt) {
^

@doris-robot
Copy link

TPC-H test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
Tpch sf100 test result on commit 5e2495ffe9c10558a7b7931fe63ca12177c285c8, data reload: false

run tpch-sf100 query with default conf and session variables
q1	4922	4639	4670	4639
q2	358	179	145	145
q3	1501	1286	1298	1286
q4	1149	973	950	950
q5	3254	3239	3245	3239
q6	259	134	133	133
q7	1001	514	588	514
q8	2254	2239	2222	2222
q9	6932	6980	6972	6972
q10	3319	3359	3374	3359
q11	337	218	220	218
q12	353	216	219	216
q13	4628	3916	4538	3916
q14	248	229	219	219
q15	601	528	521	521
q16	431	371	391	371
q17	1033	663	612	612
q18	8075	7952	7691	7691
q19	1558	1570	1555	1555
q20	546	1184	317	317
q21	3431	2931	2969	2931
q22	378	302	308	302
Total cold run time: 46568 ms
Total hot run time: 42328 ms

run tpch-sf100 query with default conf and set session variable runtime_filter_mode=off
q1	4621	4594	4607	4594
q2	330	207	243	207
q3	3757	3757	3767	3757
q4	2542	2526	2527	2526
q5	6214	6184	6207	6184
q6	249	120	128	120
q7	2637	1966	2006	1966
q8	3768	3745	3796	3745
q9	9462	9405	9402	9402
q10	4057	4171	4150	4150
q11	671	520	530	520
q12	803	647	648	647
q13	4413	3619	3609	3609
q14	272	266	264	264
q15	587	529	526	526
q16	535	490	504	490
q17	2159	2101	2105	2101
q18	9643	9216	8965	8965
q19	1804	1767	1776	1767
q20	2330	1994	1968	1968
q21	7495	7027	7099	7027
q22	632	614	599	599
Total cold run time: 68981 ms
Total hot run time: 65134 ms

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 44.01 seconds
stream load tsv: 562 seconds loaded 74807831229 Bytes, about 126 MB/s
stream load json: 18 seconds loaded 2358488459 Bytes, about 124 MB/s
stream load orc: 65 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 29.0 seconds inserted 10000000 Rows, about 344K ops/s
storage size: 17163888362 Bytes

@doris-robot
Copy link

TPC-H test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
Tpch sf100 test result on commit 0f2c7a7eeef3cbb7af014d7da32d91c9cd28ef94, data reload: false

run tpch-sf100 query with default conf and session variables
q1	4895	4639	4688	4639
q2	348	168	158	158
q3	1516	1295	1267	1267
q4	1151	941	908	908
q5	3221	3231	3231	3231
q6	246	129	129	129
q7	986	520	550	520
q8	2290	2244	2237	2237
q9	7275	7011	7614	7011
q10	3302	3379	3381	3379
q11	350	210	210	210
q12	353	212	212	212
q13	4626	3861	3864	3861
q14	249	225	219	219
q15	593	548	537	537
q16	448	389	404	389
q17	1035	666	593	593
q18	8269	7706	7545	7545
q19	1567	1565	1538	1538
q20	526	354	319	319
q21	3438	2990	2977	2977
q22	373	297	304	297
Total cold run time: 47057 ms
Total hot run time: 42176 ms

run tpch-sf100 query with default conf and set session variable runtime_filter_mode=off
q1	4582	4604	4584	4584
q2	313	198	246	198
q3	3761	3752	3738	3738
q4	2540	2533	2519	2519
q5	6206	6211	6207	6207
q6	243	122	125	122
q7	2590	1951	1958	1951
q8	3763	3757	3706	3706
q9	9490	9483	9468	9468
q10	4060	4168	4152	4152
q11	638	513	519	513
q12	819	609	634	609
q13	4402	3643	3692	3643
q14	275	245	248	245
q15	589	535	530	530
q16	528	488	471	471
q17	2114	2082	2120	2082
q18	9612	9020	9058	9020
q19	1804	1790	1792	1790
q20	2313	2009	1986	1986
q21	7330	6901	6925	6901
q22	679	577	565	565
Total cold run time: 68651 ms
Total hot run time: 65000 ms

@Yukang-Lian Yukang-Lian force-pushed the Support_Dynamic_Wal_Space_Limit branch from 0f2c7a7 to fd6016c Compare November 30, 2023 17:28
@Yukang-Lian
Copy link
Collaborator Author

run buildall

@doris-robot
Copy link

TPC-H test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
Tpch sf100 test result on commit fd6016c0dd628f8ee5fe136389974c1f7fb263dd, data reload: false

run tpch-sf100 query with default conf and session variables
q1	4894	4644	4661	4644
q2	356	156	159	156
q3	1502	1305	1288	1288
q4	1152	966	920	920
q5	3260	3257	3249	3249
q6	253	130	134	130
q7	1036	523	562	523
q8	2278	2266	2229	2229
q9	6941	7070	6951	6951
q10	3298	3371	3361	3361
q11	338	213	218	213
q12	353	219	219	219
q13	4681	3857	3911	3857
q14	255	216	222	216
q15	583	544	527	527
q16	454	429	394	394
q17	1034	643	618	618
q18	8490	7832	7443	7443
q19	1566	1528	1561	1528
q20	568	383	334	334
q21	3457	2996	2970	2970
q22	368	292	313	292
Total cold run time: 47117 ms
Total hot run time: 42062 ms

run tpch-sf100 query with default conf and set session variable runtime_filter_mode=off
q1	4624	4596	4615	4596
q2	320	214	252	214
q3	3776	3751	3735	3735
q4	2547	2511	2523	2511
q5	6202	6205	6199	6199
q6	247	126	126	126
q7	2613	2011	1981	1981
q8	3759	3750	3742	3742
q9	9398	9462	9389	9389
q10	4040	4164	4144	4144
q11	642	494	489	489
q12	813	628	621	621
q13	4385	3643	3624	3624
q14	280	237	242	237
q15	581	531	531	531
q16	538	487	524	487
q17	2140	2078	2097	2078
q18	9725	9010	9034	9010
q19	1824	1754	1781	1754
q20	2318	1993	1962	1962
q21	7348	6865	6892	6865
q22	716	577	545	545
Total cold run time: 68836 ms
Total hot run time: 64840 ms

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 43.34 seconds
stream load tsv: 560 seconds loaded 74807831229 Bytes, about 127 MB/s
stream load json: 18 seconds loaded 2358488459 Bytes, about 124 MB/s
stream load orc: 65 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 27.9 seconds inserted 10000000 Rows, about 358K ops/s
storage size: 17163546536 Bytes

@Yukang-Lian
Copy link
Collaborator Author

run pipelinex_p0

@Yukang-Lian Yukang-Lian force-pushed the Support_Dynamic_Wal_Space_Limit branch from fd6016c to b120981 Compare December 5, 2023 17:41
@Yukang-Lian
Copy link
Collaborator Author

run buildall

@doris-robot
Copy link

TPC-H test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'

Tpch sf100 test result on commit 5ee0e280a4c6dbb488d8b1da7221546ee51903e7, data reload: false

run tpch-sf100 query with default conf and session variables
q1	4687	4453	4443	4443
q2	387	138	157	138
q3	1458	1278	1222	1222
q4	1105	884	884	884
q5	3178	3208	3202	3202
q6	252	130	136	130
q7	1009	486	496	486
q8	2194	2235	2215	2215
q9	6700	6695	6657	6657
q10	3205	3282	3284	3282
q11	306	192	185	185
q12	358	204	212	204
q13	4570	3799	3779	3779
q14	238	213	223	213
q15	574	524	514	514
q16	442	389	386	386
q17	1017	696	581	581
q18	7046	6748	6978	6748
q19	1535	1420	1479	1420
q20	531	312	310	310
q21	3101	2670	2644	2644
q22	345	282	281	281
Total cold run time: 44238 ms
Total hot run time: 39924 ms

run tpch-sf100 query with default conf and set session variable runtime_filter_mode=off
q1	4360	4391	4386	4386
q2	274	165	172	165
q3	3529	3498	3504	3498
q4	2408	2375	2380	2375
q5	5731	5698	5721	5698
q6	246	123	124	123
q7	2372	1836	1826	1826
q8	3533	3545	3543	3543
q9	9081	9006	9029	9006
q10	3920	3986	3995	3986
q11	488	368	371	368
q12	772	592	611	592
q13	4279	3541	3535	3535
q14	290	252	254	252
q15	567	522	520	520
q16	499	478	467	467
q17	1909	1893	1877	1877
q18	8570	8221	8140	8140
q19	1761	1769	1770	1769
q20	2250	1939	1943	1939
q21	6518	6204	6151	6151
q22	494	431	416	416
Total cold run time: 63851 ms
Total hot run time: 60632 ms

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.61% (8560/23383)
Line Coverage: 28.68% (69623/242747)
Region Coverage: 27.66% (35996/130121)
Branch Coverage: 24.39% (18399/75448)
Coverage Report: http://coverage.selectdb-in.cc/coverage/5ee0e280a4c6dbb488d8b1da7221546ee51903e7_5ee0e280a4c6dbb488d8b1da7221546ee51903e7/report/index.html

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 44.19 seconds
stream load tsv: 566 seconds loaded 74807831229 Bytes, about 126 MB/s
stream load json: 19 seconds loaded 2358488459 Bytes, about 118 MB/s
stream load orc: 66 seconds loaded 1101869774 Bytes, about 15 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 28.3 seconds inserted 10000000 Rows, about 353K ops/s
storage size: 17183750098 Bytes

@Yukang-Lian
Copy link
Collaborator Author

run external

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

return _wal_dir;
}

size_t WalDirInfo::get_limit() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: method 'get_limit' can be made const [readability-make-member-function-const]

Suggested change
size_t WalDirInfo::get_limit() {
size_t WalDirInfo::get_limit() const {

be/src/olap/wal_dirs_info.h:41:

-     size_t get_limit();
+     size_t get_limit() const;

return _limit;
}

size_t WalDirInfo::get_used() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: method 'get_used' can be made const [readability-make-member-function-const]

Suggested change
size_t WalDirInfo::get_used() {
size_t WalDirInfo::get_used() const {

be/src/olap/wal_dirs_info.h:42:

-     size_t get_used();
+     size_t get_used() const;

return _used;
}

size_t WalDirInfo::get_pre_allocated() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: method 'get_pre_allocated' can be made const [readability-make-member-function-const]

Suggested change
size_t WalDirInfo::get_pre_allocated() {
size_t WalDirInfo::get_pre_allocated() const { const

return Status::OK();
}

size_t WalDirInfo::available() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: method 'available' can be made const [readability-make-member-function-const]

Suggested change
size_t WalDirInfo::available() {
size_t WalDirInfo::available() const {

be/src/olap/wal_dirs_info.h:47:

-     size_t available();
+     size_t available() const;

return available > 0 ? available : 0;
}

Status WalDirInfo::update_wal_disk_info(size_t limit, size_t used, size_t pre_allocated,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: method 'update_wal_disk_info' can be made static [readability-convert-member-functions-to-static]

Suggested change
Status WalDirInfo::update_wal_disk_info(size_t limit, size_t used, size_t pre_allocated,
static Status WalDirInfo::update_wal_disk_info(size_t limit, size_t used, size_t pre_allocated,

&_replay_thread);
}

Status WalManager::_init_wal_dirs_conf() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: method '_init_wal_dirs_conf' can be made static [readability-convert-member-functions-to-static]

be/src/olap/wal_manager.h:86:

-     Status _init_wal_dirs_conf();
+     static Status _init_wal_dirs_conf();

return Status::OK();
}

Status WalManager::_init_wal_dirs() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: method '_init_wal_dirs' can be made static [readability-convert-member-functions-to-static]

be/src/olap/wal_manager.h:87:

-     Status _init_wal_dirs();
+     static Status _init_wal_dirs();

return Status::OK();
}

Status WalManager::_init_wal_dirs_info() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: method '_init_wal_dirs_info' can be made static [readability-convert-member-functions-to-static]

be/src/olap/wal_manager.h:88:

-     Status _init_wal_dirs_info();
+     static Status _init_wal_dirs_info();

@@ -344,31 +418,20 @@
}
}

Status WalManager::delete_wal(int64_t wal_id) {
Status WalManager::delete_wal(int64_t wal_id, size_t block_queue_pre_allocated) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: method 'delete_wal' can be made static [readability-convert-member-functions-to-static]

be/src/olap/wal_manager.h:56:

-     Status delete_wal(int64_t wal_id, size_t block_queue_pre_allocated = 0);
+     static Status delete_wal(int64_t wal_id, size_t block_queue_pre_allocated = 0);

@@ -475,4 +484,67 @@ Status LoadBlockQueue::close_wal() {
}
return Status::OK();
}

bool LoadBlockQueue::has_enough_wal_disk_space(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: method 'has_enough_wal_disk_space' can be made static [readability-convert-member-functions-to-static]

Suggested change
bool LoadBlockQueue::has_enough_wal_disk_space(
static bool LoadBlockQueue::has_enough_wal_disk_space(

@Yukang-Lian Yukang-Lian force-pushed the Support_Dynamic_Wal_Space_Limit branch from 956bdeb to dcdc080 Compare December 25, 2023 17:40
@Yukang-Lian
Copy link
Collaborator Author

run buildall

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

return available > 0 ? available : 0;
}

Status WalDirInfo::update_wal_dir_limit(size_t limit) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: method 'update_wal_dir_limit' can be made static [readability-convert-member-functions-to-static]

Suggested change
Status WalDirInfo::update_wal_dir_limit(size_t limit) {
static Status WalDirInfo::update_wal_dir_limit(size_t limit) {

return Status::OK();
}

Status WalDirInfo::update_wal_dir_used(size_t used) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: method 'update_wal_dir_used' can be made static [readability-convert-member-functions-to-static]

Suggested change
Status WalDirInfo::update_wal_dir_used(size_t used) {
static Status WalDirInfo::update_wal_dir_used(size_t used) {

return Status::OK();
}

Status WalDirInfo::update_wal_dir_pre_allocated(size_t pre_allocated, bool is_add_pre_allocated) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: method 'update_wal_dir_pre_allocated' can be made static [readability-convert-member-functions-to-static]

Suggested change
Status WalDirInfo::update_wal_dir_pre_allocated(size_t pre_allocated, bool is_add_pre_allocated) {
static Status WalDirInfo::update_wal_dir_pre_allocated(size_t pre_allocated, bool is_add_pre_allocated) {

->available();
}

Status WalDirsInfo::update_wal_dir_limit(std::string wal_dir, size_t limit) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: method 'update_wal_dir_limit' can be made static [readability-convert-member-functions-to-static]

Suggested change
Status WalDirsInfo::update_wal_dir_limit(std::string wal_dir, size_t limit) {
static Status WalDirsInfo::update_wal_dir_limit(std::string wal_dir, size_t limit) {

return Status::InternalError("Can not find wal dir in wal disks info.");
}

Status WalDirsInfo::update_all_wal_dir_limit() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: method 'update_all_wal_dir_limit' can be made static [readability-convert-member-functions-to-static]

Suggested change
Status WalDirsInfo::update_all_wal_dir_limit() {
static Status WalDirsInfo::update_all_wal_dir_limit() {

&_replay_thread);
}

Status WalManager::_init_wal_dirs_conf() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: method '_init_wal_dirs_conf' can be made static [readability-convert-member-functions-to-static]

be/src/olap/wal_manager.h:90:

-     Status _init_wal_dirs_conf();
+     static Status _init_wal_dirs_conf();

return Status::OK();
}

Status WalManager::_init_wal_dirs() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: method '_init_wal_dirs' can be made static [readability-convert-member-functions-to-static]

be/src/olap/wal_manager.h:91:

-     Status _init_wal_dirs();
+     static Status _init_wal_dirs();

@@ -344,31 +426,20 @@
}
}

Status WalManager::delete_wal(int64_t wal_id) {
Status WalManager::delete_wal(int64_t wal_id, size_t block_queue_pre_allocated) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: method 'delete_wal' can be made static [readability-convert-member-functions-to-static]

be/src/olap/wal_manager.h:58:

-     Status delete_wal(int64_t wal_id, size_t block_queue_pre_allocated = 0);
+     static Status delete_wal(int64_t wal_id, size_t block_queue_pre_allocated = 0);

is_add_pre_allocated);
}

Status WalManager::_update_wal_dir_info_thread() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: method '_update_wal_dir_info_thread' can be made static [readability-convert-member-functions-to-static]

be/src/olap/wal_manager.h:95:

-     Status _update_wal_dir_info_thread();
+     static Status _update_wal_dir_info_thread();

@@ -123,4 +123,107 @@ TEST_F(WalManagerTest, recovery_normal) {
ASSERT_TRUE(!std::filesystem::exists(wal_200));
ASSERT_TRUE(!std::filesystem::exists(wal_201));
}

TEST_F(WalManagerTest, TestDynamicWalSpaceLimt) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: function 'TEST_F' exceeds recommended size/complexity thresholds [readability-function-size]

TEST_F(WalManagerTest, TestDynamicWalSpaceLimt) {
^
Additional context

be/test/olap/wal_manager_test.cpp:126: 101 lines including whitespace and comments (threshold 80)

TEST_F(WalManagerTest, TestDynamicWalSpaceLimt) {
^

@Yukang-Lian
Copy link
Collaborator Author

run buildall

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

return _wal_dir;
}

size_t WalDirInfo::get_limit() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: method 'get_limit' can be made const [readability-make-member-function-const]

Suggested change
size_t WalDirInfo::get_limit() {
size_t WalDirInfo::get_limit() const {

be/src/olap/wal_dirs_info.h:42:

-     size_t get_limit();
+     size_t get_limit() const;

return _limit;
}

size_t WalDirInfo::get_used() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: method 'get_used' can be made const [readability-make-member-function-const]

Suggested change
size_t WalDirInfo::get_used() {
size_t WalDirInfo::get_used() const {

be/src/olap/wal_dirs_info.h:43:

-     size_t get_used();
+     size_t get_used() const;

return Status::OK();
}

size_t WalDirInfo::available() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: method 'available' can be made const [readability-make-member-function-const]

Suggested change
size_t WalDirInfo::available() {
size_t WalDirInfo::available() const {

be/src/olap/wal_dirs_info.h:48:

-     size_t available();
+     size_t available() const;

return Status::OK();
}

Status WalDirsInfo::add(const std::string& wal_dir, size_t limit, size_t used,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: method 'add' can be made static [readability-convert-member-functions-to-static]

be/src/olap/wal_dirs_info.h:67:

-     Status add(const std::string& wal_dir, size_t limit, size_t used, size_t pre_allocated);
+     static Status add(const std::string& wal_dir, size_t limit, size_t used, size_t pre_allocated);

return Status::OK();
}

Status WalDirsInfo::clear() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: method 'clear' can be made static [readability-convert-member-functions-to-static]

be/src/olap/wal_dirs_info.h:68:

-     Status clear();
+     static Status clear();

return Status::InternalError("Can not find wal dir in wal disks info.");
}

Status WalDirsInfo::update_all_wal_dir_limit() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: method 'update_all_wal_dir_limit' can be made static [readability-convert-member-functions-to-static]

be/src/olap/wal_dirs_info.h:72:

-     Status update_all_wal_dir_limit();
+     static Status update_all_wal_dir_limit();

return Status::OK();
}

Status WalDirsInfo::update_wal_dir_used(std::string wal_dir, size_t used) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: method 'update_wal_dir_used' can be made static [readability-convert-member-functions-to-static]

be/src/olap/wal_dirs_info.h:73:

-     Status update_wal_dir_used(std::string wal_dir, size_t used = -1);
+     static Status update_wal_dir_used(std::string wal_dir, size_t used = -1);

return Status::InternalError("Can not find wal dir in wal disks info.");
}

Status WalDirsInfo::update_all_wal_dir_used() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: method 'update_all_wal_dir_used' can be made static [readability-convert-member-functions-to-static]

be/src/olap/wal_dirs_info.h:74:

-     Status update_all_wal_dir_used();
+     static Status update_all_wal_dir_used();

return Status::OK();
}

Status WalDirsInfo::update_wal_dir_pre_allocated(std::string wal_dir, size_t pre_allocated,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: method 'update_wal_dir_pre_allocated' can be made static [readability-convert-member-functions-to-static]

be/src/olap/wal_dirs_info.h:75:

-     Status update_wal_dir_pre_allocated(std::string wal_dir, size_t pre_allocated,
+     static Status update_wal_dir_pre_allocated(std::string wal_dir, size_t pre_allocated,

return Status::InternalError("Can not find wal dir in wal disks info.");
}

Status WalDirsInfo::get_wal_dir_available_size(const std::string& wal_dir,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: method 'get_wal_dir_available_size' can be made static [readability-convert-member-functions-to-static]

be/src/olap/wal_dirs_info.h:77:

-     Status get_wal_dir_available_size(const std::string& wal_dir, size_t* available_bytes);
+     static Status get_wal_dir_available_size(const std::string& wal_dir, size_t* available_bytes);

@Yukang-Lian
Copy link
Collaborator Author

run buildall

@doris-robot
Copy link

TPC-H test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'

Tpch sf100 test result on commit 3a2aede8b0a558f73b25313f5b0bd159d352432c, data reload: false

run tpch-sf100 query with default conf and session variables
q1	4714	4442	4448	4442
q2	377	180	166	166
q3	1478	1310	1315	1310
q4	1151	973	959	959
q5	3184	3144	3196	3144
q6	258	135	134	134
q7	1037	488	485	485
q8	2244	2308	2247	2247
q9	6717	6680	6699	6680
q10	3226	3276	3280	3276
q11	331	221	220	220
q12	359	206	205	205
q13	4578	3821	3818	3818
q14	247	212	220	212
q15	560	530	524	524
q16	441	387	381	381
q17	1038	788	656	656
q18	7076	6846	7765	6846
q19	1581	1605	1595	1595
q20	580	309	327	309
q21	3233	2802	2801	2801
q22	380	302	311	302
Total cold run time: 44790 ms
Total hot run time: 40712 ms

run tpch-sf100 query with default conf and set session variable runtime_filter_mode=off
q1	4403	4438	4382	4382
q2	277	169	167	167
q3	3514	3513	3497	3497
q4	2445	2424	2396	2396
q5	5733	5731	5714	5714
q6	247	127	128	127
q7	2367	1830	1885	1830
q8	3607	3604	3601	3601
q9	9017	8950	9021	8950
q10	3934	4016	4034	4016
q11	479	360	364	360
q12	773	612	594	594
q13	4285	3525	3564	3525
q14	282	255	259	255
q15	567	518	523	518
q16	505	458	464	458
q17	1967	1971	1940	1940
q18	8739	8145	8284	8145
q19	1822	1837	1839	1837
q20	2279	1956	1927	1927
q21	6641	6257	6240	6240
q22	558	451	467	451
Total cold run time: 64441 ms
Total hot run time: 60930 ms

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 44.46 seconds
stream load tsv: 568 seconds loaded 74807831229 Bytes, about 125 MB/s
stream load json: 19 seconds loaded 2358488459 Bytes, about 118 MB/s
stream load orc: 66 seconds loaded 1101869774 Bytes, about 15 MB/s
stream load parquet: 33 seconds loaded 861443392 Bytes, about 24 MB/s
insert into select: 28.9 seconds inserted 10000000 Rows, about 346K ops/s
storage size: 17184209698 Bytes

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.61% (8583/23442)
Line Coverage: 28.66% (69762/243409)
Region Coverage: 27.66% (36064/130405)
Branch Coverage: 24.37% (18425/75620)
Coverage Report: http://coverage.selectdb-in.cc/coverage/3a2aede8b0a558f73b25313f5b0bd159d352432c_3a2aede8b0a558f73b25313f5b0bd159d352432c/report/index.html

Copy link
Contributor

@dataroaring dataroaring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Dec 27, 2023
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@dataroaring dataroaring merged commit 9ff8bd2 into apache:master Dec 27, 2023
24 of 26 checks passed
CalvinKirs added a commit to CalvinKirs/incubator-doris that referenced this pull request Dec 27, 2023
* [Performance](point query)Opimize partition prune for point query (apache#28150)

* [Performance](point query)Opimize partition prune for point query

* [fix](stacktrace) ignore stacktrace for error code INVALID_ARGUMENT INVERTED_INDEX_NOT_IMPLEMENTED (apache#27898) (apache#28598)

* ignore stacktrace for error INVALID_ARGUMENT INVERTED_INDEX_NOT_IMPLEMENTED

* AndBlockColumnPredicate::evaluate

* [bugfix](topn) fix coredump in copy_column_data_to_block when nullable mismatch (apache#28597)

* [bugfix](topn) fix coredump in copy_column_data_to_block when nullable mismatch

return RuntimeError if copy_column_data_to_block nullable mismatch to avoid coredump in input_col_ptr->filter_by_selector(sel_rowid_idx, select_size, raw_res_ptr) .

The problem is reported by a doris user but I can not reproduce it, so there is no testcase added currently.

* clang format

* [feature](Nereids): eliminate semi join (apache#28588)

Eliminate Semi/Anti Join which is FALSE or TRUE.

* [feature](Nereids) support datev1 and datetimev1 (apache#28581)

* [improvement](http) add show_table_data http api (apache#28380)

In some cases, users need to get the data size of single replica of a table, and evaluate certain actions based on this, such as estimating the precise backup size.

Signed-off-by: nextdreamblue <zxw520blue1@163.com>

* [Enhance](regression)enhance jdbc case to adapt to use case concurrency (apache#28565)

enhance jdbc case to adapt to use case concurrency

* [opt](Nereids)when both Nereids and old parsers report errors, prompt error messages for the Nereids (apache#28580)

* [Improvement](regression) change compound predicate regression case name to make it more clear (apache#28612)

* [regression](memtable) add case for memtable flush error handle (apache#28285)

Co-authored-by: ziyang zhang <zhangziyang@stu.cdut.edu.cn>

* [regression-test](memtable)  test memtable flush is high priority for vtable writerV1 (apache#28502)

* enhance performance for broken tablet checking under multi-core scenario with a coarse-grained read lock (apache#28552)

* [fix](load) fix memtracking orphan too large (apache#28600)

* [fix](memtable-limiter) do not block write if load mem usage is low (apache#28602)


Co-authored-by: Yongqiang YANG <98214048+dataroaring@users.noreply.github.com>

* [refactor](renamefile) rename some files according to the class names (apache#28606)

* [feature](mtmv)create mtmv support refresh_partition_num (apache#28566)

- create/alter mtmv support refresh_partition_num
- mtmv task according to refresh_partition_num executes refresh tasks in batches
- `tasks` tvf add column `CompletedPartitions` and `progress`
- fix mtmv can not `show temp partition` and `drop temp partition`
- fix task can not get error msg when insert overwrite error
- fix when the partition field is capitalized, the verification of creating a mtmv does not pass

* [fix](Nereids) stats estimation of lessThan apache#28444

* [fix](regression)Change analyze_timeout to global.  (apache#28587)

Fix hive statistics regression case. analyze_timeout is a global session variable.

* [chore] Add bvar for meta operations of BE (apache#28374)

* [Bug](cooldown) Fix problem that followers may never completely cooldown (apache#28561)

* [Improve](tvf)jni-avro support split file (apache#27933)

* [feature](mtmv)after creating a materialized view, if other operations fail, roll back  (apache#28621)

after create mtmv, if create job failed,need drop mtmv

* [fix](meta) update killed query state (#) (apache#25917)

* [refactor](profile&names) using dst_id in pipelinex profile to be same as non pipeline; rename some function names (apache#28626)

Co-authored-by: yiguolei <yiguolei@gmail.com>

* [feature][executor]support workload schedule policy (apache#28443)

* [feature](expr) Support kill query by query_id (apache#28530)

Issue Number: open apache#28517

* [chore](user) Add user property `parallel_fragment_exec_instance_num` (apache#28447)

* [feature](inverted index) add ignore_above property to prevent long s… (apache#28585)

When string is too long, clucene will throw an error. 
And the string is too long to analyze. So we ignore the string in index process when the string is longer than 256 bytes by default.
We add an poperty `ignore_above` for user to customize.

* [Enhance](broker) add inputstream expire scheduled checker to avoid memory leak for broker scan (apache#28589)

This pr introduces 2 broker conf:

1. enable_input_stream_expire_check: which indicates whether enable inputStream expire check.
2. input_stream_expire_seconds: which indicates the timeout seconds for inputStream since last update.

* [fix](hive) add support for `quoteChar` and `seperatorChar` for hive (apache#28613)

add support for quoteChar and seperatorChar .

* [Fix](transactional-hive) Fix hive transactional table return empty result. (apache#28518)

* [Fix](memtable) fix `shrink_memtable_by_agg` without duplicated keys (apache#28660)

remove duplicated logic:
```
vectorized::Block in_block = _input_mutable_block.to_block();
_put_into_output(in_block);
```
`_input_mutable_block.to_block()` will move `_input_mutable_block`, and lead to `flush` with empty block

* [enhance](partition_id) check partition id before store meta (apache#28055)

* [opt](task-assignment) use consistent hash as default task assigner and cache the consistent hash ring (apache#28522)

1. Use consistent hash algo as the default assigner for file query scan node
    A consistent assignment can better utilize the page cache of BE node.

2. Cache the consistent hash ring
    Init a consistent hash ring is time-consuming because there a thousands of virtual node need to be added.
    So cache it for better performance

* [Fix](Job)Fixed job scheduling missing certain time window schedules (apache#28659)

Since scheduling itself consumes a certain amount of time, the start time of the time window should not be the current time, but the end time of the last schedule.

* [fix](test) fix ccr test cases (apache#28664)

* [fix](regression) fix test_set_replica_status due to force_olap_table_replication_num=3 (apache#28573)

* [fix](regression) restore reserve num replicas (apache#28541)

* [fix](regression) fix test_alter_colocate_table due to force_olap_table_replication_num=3 (apache#28575)

* [improvement](transaction) reduce publish txn log (apache#28277)

* [fix](stream_load)fix bug for stream (apache#27752)

1. forbid thed  stream_load without content-length or chunked Transfer Encoding
2. forbid thed  stream_load both with content-length and chunked Transfer Encoding

Co-authored-by: xingying01 <xingying01@corp.netease.com>

* [Revert](partial update) Revert "Fix missing rowsets during doing alignment when flushing memtable due to compaction (apache#28062)" (apache#28674)

This reverts commit 485d7db.

* [feat](Nereids) support outer join and aggregate bitmap rewrite by mv (apache#28596)

- Support left outer join rewrite by materialized view
- Support bitmap_union roll up to imp count(distinct)
- Support partition materialized view rewrite

* [refactor](runtimefilter) do not use QueryContext in runtime filter (apache#28559)

* [fix](planner)should bind expr using no slot to correct tuple (apache#28656)

* [fix](planner) ctas update datev1 to datev2 should use equals (apache#28641)

* [fix](Nereids) should only do bind relation in view analyzer (apache#28637)

* [code](pipelineX) refine some pipelineX code  (apache#28570)

* [fix](partial update) report error directly if missing rowsets during doing alignment when flushing memtable due to compaction  (apache#28677)

* [opt](inverted index) Add null document interface to optimize empty string indexing (apache#28661)

* [feature](invert index) match_regexp feature added (apache#28257)

* [Feature](datatype) update be ut codes and fix bugs for IPv4/v6 (apache#28670)

* [test](Nereids): remove shape plan project and distribute in eager test (apache#28701)

* [fix](statistics)Fix drop stats fail silently bug. (apache#28635)

Drop stats use IN predicate to filter the column stats to delete. The default length of IN predicate is 1024, drop table stats with more than 1024 columns may fail.
This pr is to split the delete sql based on the IN predicate length.

* [fix](mtmv) fix insert overwrite getExecTimeout error (apache#28700)

should use InsertTimeout but QueryTimeout

* [Enhancement](auto-partition) change the behaviour when insert overwrite an auto partition table apache#28683

If we specific target partition(s) when inserting overwrite an auto partition table,
before:
could create new partition
now:
behalf just like non-auto partition table

* [FIX](regresstest) fix case with double value apache#28668

double value in case has 27 figures after the point, which will make not standable output

* [test](Nereids): add test for scalar agg (apache#28712)

* [fix](meta_scanner) fix meta_scanner process ColumnNullable (apache#28711)

* [fix](nereids) Fix data wrong using mv rewrite and ignore case when getting mv related partition table (apache#28699)

1. Fix data wrong using mv rewrite
2. Ignore case when getting mv related partition table
3. Enable infer expression column name without alias when create mv

* [test](regression-test) order by decs should only make effect on its nearest column apache#28728

* [refine](pipelineX)Make the 'set ready' logic of SenderQueue in pipelineX the same as that in the pipeline (apache#28488)

* [fix](Nereids) delete partition failed (apache#28717)

1. parser's partitionSpec changed unexpectly by PR apache#26492
2. delete without using should support un-equals expression

* [fix](tvf)Fixed the avro-scanner projection pushdown failing to query on multiple BEs (apache#28709)

* [fix](block) fix nullptr in MutableBlock::allocated_bytes (apache#28738)

* [fix](mtmv)fix thread local reference to checkpoint's Env, causing Env to be unable to be reclaimed, resulting in excessive memory usage by FE (apache#28723)

when replay addTaskResult log,will create one ConnectContext,and set Env.getCurrentEnv,then store this ctx in ConnectContext.threadLocalInfo,threadLocalInfo is static,so this ctx can not be recycling,Env of replay thread also can not be recycling

* [Fix](json reader) fix json reader crash due to `fmt::format_to` (apache#28737)

```
4# __gnu_cxx::__verbose_terminate_handler() [clone .cold] at ../../../../libstdc++-v3/libsupc++/vterminate.cc:75
5# __cxxabiv1::__terminate(void (*)()) at ../../../../libstdc++-v3/libsupc++/eh_terminate.cc:48
6# 0x00005622F33D22B1 in /mnt/ssd01/pipline/OpenSourceDoris/clusterEnv/P0/Cluster0/be/lib/doris_be
7# 0x00005622F33D2404 in /mnt/ssd01/pipline/OpenSourceDoris/clusterEnv/P0/Cluster0/be/lib/doris_be
8# fmt::v7::detail::error_handler::on_error(char const*) in /mnt/ssd01/pipline/OpenSourceDoris/clusterEnv/P0/Cluster0/be/lib/doris_be
9# char const* fmt::v7::detail::parse_replacement_field<char, fmt::v7::detail::format_handler<fmt::v7::detail::buffer_appender<char>, char, fmt::v7::basic_format_context<fmt::v7::detail::buffer_appender<char>, char> >&>(char const*, char const*, fmt::v7::detail::format_handler<fmt::v7::detail::buffer_appender<char>, char, fmt::v7::basic_format_context<fmt::v7::detail::buffer_appender<char>, char> >&) in /mnt/ssd01/pipline/OpenSourceDoris/clusterEnv/P0/Cluster0/be/lib/doris_be
10# void fmt::v7::detail::vformat_to<char>(fmt::v7::detail::buffer<char>&, fmt::v7::basic_string_view<char>, fmt::v7::basic_format_args<fmt::v7::basic_format_context<fmt::v7::detail::buffer_appender<fmt::v7::type_identity<char>::type>, fmt::v7::type_identity<char>::type> >, fmt::v7::detail::locale_ref) in /mnt/ssd01/pipline/OpenSourceDoris/clusterEnv/P0/Cluster0/be/lib/doris_be
11# doris::vectorized::NewJsonReader::_append_error_msg(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool*) at /root/doris/be/src/vec/exec/format/json/new_json_reader.cpp:924
12# doris::vectorized::NewJsonReader::_set_column_value
```

* [bug](coredump) Fix coredump in aggregation node's destruction(apache#28684)

fix coredump in aggregation node's destruction

* [pipelineX](improvement) Support global runtime filter (apache#28692)

* [FIX](explode)fix explode array decimal (apache#28744)

* fix explode with array<decimal> has specific precision at old planner

* [refactor](broadcastbuffer) using a queue to remove ref and unref codes (apache#28698)

Co-authored-by: yiguolei <yiguolei@gmail.com>Add a new class broadcastbufferholderqueue to manage holders
Using shared ptr to manage holders, not use ref and unref, it is too difficult to maintain.

* [enhance](blacklist) seperate blacklist conf from heartbeat (apache#28638)

There is a circuit breaker lasting for 2 minutes in grpc, then if a be is down and up again, send fragments to the be fails lasting for 2 minutes.

* [fix](stmt):fix CreateTableStmt toSql placed comment in wrong place (apache#27504)

Issue Number: close apache#27474
Co-authored-by: tongyang.han <tongyang.han@jiduauto.com>

* [Improve](compile) add `__AVX2__` macro for JsonbParser (apache#28754)

* [Improve](compile) add `__AVX2__` macro for JsonbParser

* throw exception instead of CHECK

* [Feature](materialized-view) support match logicalAggregate(logicalProject(logicalFilter(logicalOlapScan())) without agg (apache#28747)

support match logicalAggregate(logicalProject(logicalFilter(logicalOlapScan())) without agg

* [Fix] (schema change) forbid adding time type column (apache#28751)

* [fix](group_commit) fix group commit cancel stuck (apache#28749)

* [fix](scanner) fix concurrency bugs when scanner is stopped or finished (apache#28650)

`ScannerContext` will schedule scanners even after stopped, and confused with `_is_finished` and `_should_stop`.
 Only Fix the concurrency bugs when scanner is stopped or finished reported in apache#28384

* [fix](regression) fix stream load properties case fail (apache#28680)

* [fix](fe ut) fix PropertyConverterTest (apache#28722)

* [improve](rpc) Log channel state before shutdown backend service client (apache#28667)

* [fix](publish version) fix publish fail but return ok (apache#28425)

* [test](Nereids): remove shape plan project and distribute in eager test (apache#28724)

* [refactor](nereids) make NormalizeAggregate rule more clear and readable (apache#28607)

* [FIX](type) fix matchExactType for complex type (apache#28233)

fe matchExactType function should call type.matchTypes for its own logic, do not switch case to do special logic otherwise we may meet core in be like this.
 ```
F20231208 18:54:39.359673 680131 block.h:535] Check failed: _data_types[i]->is_nullable()  target type: Struct(l_info:Nullable(Array(Nullable(String)))) src type: Struct(col:Nullable(Array(Nullable(UInt8))))
*** Check failure stack trace: ***
    @     0x5584e952b926  google::LogMessage::SendToLog()
    @     0x5584e9527ef0  google::LogMessage::Flush()
    @     0x5584e952c169  google::LogMessageFatal::~LogMessageFatal()
    @     0x5584cf17201e  doris::vectorized::MutableBlock::merge_impl<>()
    @     0x5584ceac4b1d  doris::vectorized::MutableBlock::merge<>()
    @     0x5584d4dd7de3  doris::vectorized::VUnionNode::get_next_const()
    @     0x5584d4dd9a45  doris::vectorized::VUnionNode::get_next()
    @     0x5584bce469bd  std::__invoke_impl<>()
    @     0x5584bce466d0  std::__invoke<>()
    @     0x5584bce465c7  _ZNSt5_BindIFMN5doris8ExecNodeEFNS0_6StatusEPNS0_12RuntimeStateEPNS0_10vectorized5BlockEPbEPS1_St12_PlaceholderILi1EESC_ILi2EESC_ILi3EEEE6__callIS2_JOS4_OS7_OS8_EJLm0ELm1ELm2ELm3EEEET_OSt5tupleIJDpT0_EESt12_Index_tupleIJXspT1_EEE
    @     0x5584bce46358  std::_Bind<>::operator()<>()
    @     0x5584bce46208  std::__invoke_impl<>()
    @     0x5584bce46178  _ZSt10__invoke_rIN5doris6StatusERSt5_BindIFMNS0_8ExecNodeEFS1_PNS0_12RuntimeStateEPNS0_10vectorized5BlockEPbEPS3_St12_PlaceholderILi1EESD_ILi2EESD_ILi3EEEEJS5_S8_S9_EENSt9enable_ifIX16is_invocable_r_vIT_T0_DpT1_EESL_E4typeEOSM_DpOSN_
    @     0x5584bce45c18  std::_Function_handler<>::_M_invoke()
    @     0x5584bce6412f  std::function<>::operator()()
    @     0x5584bce56382  doris::ExecNode::get_next_after_projects()
    @     0x5584bce26218  doris::PlanFragmentExecutor::get_vectorized_internal()
    @     0x5584bce2431b  doris::PlanFragmentExecutor::open_vectorized_internal()
    @     0x5584bce22a96  doris::PlanFragmentExecutor::open()
    @     0x5584bce27c9d  doris::PlanFragmentExecutor::execute()
    @     0x5584bcbdb3f8  doris::FragmentMgr::_exec_actual()
    @     0x5584bcbf982f  doris::FragmentMgr::exec_plan_fragment()::$_0::operator()()
    @     0x5584bcbf9715  std::__invoke_impl<>()
    @     0x5584bcbf96b5  _ZSt10__invoke_rIvRZN5doris11FragmentMgr18exec_plan_fragmentERKNS0_23TExecPlanFragmentParamsERKSt8functionIFvPNS0_12RuntimeStateEPNS0_6StatusEEEE3$_0JEENSt9enable_ifIX16is_invocable_r_vIT_T0_DpT1_EESH_E4typeEOSI_DpOSJ_
    @     0x5584bcbf942d  std::_Function_handler<>::_M_invoke()
    @     0x5584b9dfd883  std::function<>::operator()()
    @     0x5584bd6e3929  doris::FunctionRunnable::run()
    @     0x5584bd6cf8ce  doris::ThreadPool::dispatch_thread()
```

* [test](Nereids): add assert debug log for TopnToMaxTest (apache#28755)

* [improve](move-memtable) limit task num in load stream flush token (apache#28748)

* [feature](Nereids) elimite inner join by foreign key (apache#28486)

* [enhancement](backup/restore) support alter s3 repo info about ak/sk/token (apache#27027)

in some cases:

s3.session_token/AWS_TOKEN will be expired after hours, and may be upload snapshot job will failed if data is big large;
as same reason, repo will be expired too when RepositoryMgr exec repo ping
so it need support alter s3 repo properties about ak/sk/token and update upload snapshot job properties to continue backup.

Signed-off-by: nextdreamblue <zxw520blue1@163.com>

* [improve](transaction) extend abort transaction time (apache#28662)

* [regression](p2) fix test cases result (apache#28768)

regression-test/data/external_table_p2/hive/test_hive_hudi.out
regression-test/data/external_table_p2/hive/test_hive_to_array.out
regression-test/suites/external_table_p2/tvf/test_local_tvf_compression.groovy
regression-test/suites/external_table_p2/tvf/test_path_partition_keys.groovy
regression-test/data/external_table_p2/hive/test_hive_text_complex_type.out

* (fix)[meta][export] fix replay export NPE issue (apache#28752)

The ConnectionContext does not exist in replay thread

* [Bug fix][metrics] correct fe collector type for jvm_gc (apache#28784)

Co-authored-by: 胥剑旭 <xujianxu@xujianxudeMacBook-Pro.local>

* [Chore](decimal) set check_overflow_for_decimal to true when alter table(apache#28777)

set check_overflow_for_decimal to true when alter table

* [pipelineX](fix) Fix TPCH Q2 (apache#28783)

* (topN)runtime_predicate is only triggered when the column name is obtained (apache#28419)

Issue Number: close apache#27485

* [fix](planner)fix bug of bound conjunct to wrong tuple (apache#28811)

this fix bug introduced by apache#28656

* [bug](pipelineX) Fix pipelineX bug on multiple BE (apache#28792)

* [opt](inverted index) ignore_above only affects untokenized strings (apache#28819)

* [improve](load) reduce lock scope in MemTableWriter active consumption (apache#28790)

* [opt](Nereids) improve Shape check cases (apache#28124)

* tmplate update
* log tpcds stats when check shape

* [fix](group commit)Fix the issue of duplicate addition of wal path when encouter exception (apache#28691)

* [fix](compaction) compaction should catch exception when vertical block reader read next block (apache#28625)

* [fix](Nereids) join order is not right after sql parsing (apache#28721)

for sql
```
t1, t2 join t3
```

we should generate plan like:
```
t1 join (t2 join t3)
```

but we generate:
```
(t1 join t2) join t3
```
to follow legancy planner.

* [fix](metrics) fix bvar memtable_input_block_allocated_size (apache#28725)

* [enhancement](audit-log) add status code and error msg to audit log for proxy stmt (apache#27607)

* [improvement](external catalog)Change log level to debug for getRowCountFromExternalSource. (apache#28801)

* [fix](partial update) only report error when in strict mode partial update when finding missing rowsets during flushing memtable (apache#28764)

related pr: apache#28062, apache#28674, apache#28677
fix apache#28677

* [fix](function) Fix from_second functions overflow and wrong result (apache#28685)

* [Enhancement](load) Limit the number of incorrect data drops and add documents (apache#27727)

In the load process, if there are problems with the original data, we will store the error data in an error_log file on the disk for subsequent debugging. However, if there are many error data, it will occupy a lot of disk space. Now we want to limit the number of error data that is saved to the disk.

Be familiar with the usage of doris' import function and internal implementation process
Add a new be configuration item load_error_log_limit_bytes = default value 200MB
Use the newly added threshold to limit the amount of data that RuntimeState::append_error_msg_to_file writes to disk
Write regression cases for testing and verification

Co-authored-by: xy720 <22125576+xy720@users.noreply.github.com>

* [test](partial update) add complex type regression cases for partial update (apache#28758)

NOTE: There's some issue for MAP type to work with row store, so in this PR we don't have cases for MAP type
Will add the support for MAP type in future.

* [fix](test)fix test_create_table test case for nereids (apache#28693)

* [improve](config) set mutable and masterOnly in FE config stream_load_default_memtable_on_sink_node (apache#28835)

* [fix](group-commit) check if wal need recovery is abnormal (apache#28769)

* [Fix](Variant) fix variant predicate rewrite OrToIn with wrong plan (apache#28695)

using the name without paths info will lead to wrong In plan, e.g.
```
where cast(v:a as text) = 'hello' or cast(v:b as text) = 'world'
```
will be rewrite to:
```
where cast(v as text) in ('hello', 'world')
``
This is wrong, because they are different slots

* [refactor](buffer) remove download buffer since it is no longer useful (apache#28832)

remove download buffer since it is no longer useful

* [Feature](Variant) Implement variant new sub column access method (apache#28484)

* [Feature](Variant) Implement variant new sub column access method

The query SELECT v["a"]["b"] from simple_var WHERE cast(v["a"]["b"] as int) = 1 encompasses three primary testing scenarios:

```
1. A basic test involving the variant data type.
2. A scenario dealing with GitHub event data in the context of a variant.
3. A case related to the TPC-H benchmark using a variant.
```

* [fix](memory) Add thread asynchronous purge jemalloc dirty pages (apache#28655)

jemallctl purge all arena dirty pages may take several seconds, which will block memory GC and cause OOM.
So purge asynchronously in a thread.

* [fix](regression) fix regression error of test_compress_type (apache#28826)

* [improvement](executor) Add tvf and regression test for Workload Scheduler (apache#28733)

1 Add select workload schedule policy tvf
2 Add reg test

* [chore](error msg) print type info when colocate with ddl failed due to type mismatch (apache#28773)

* [opt](query cancel) optimization for query cancel apache#28778

* [Fix](multi-catalog) skip hms events if hms table is not supported. (apache#28644)

Co-authored-by: wangxiangyu <wangxiangyu@360shuke.com>

* [Enhancement](job) No need to query some backends which are not alive. (apache#28608)

No need to execute some jobs if backend is not alive

* [fix](paimon)fix type convert for paimon (apache#28774)

fix type convert for paimon

* [fix](stream load)add test case and doc for arrow type of stream load (apache#28098)

add test case and doc for arrow type of stream load

* [feature](mtmv)mtmv partition refresh case (apache#28787)

* (enhance)(InternalQuery) Support to collect profile for intenal query (apache#28762)

* [optimize](count) optimize pk exact query without reading data (apache#28494)

* [opt](sessionVar)show changed sessoin var first apache#28840

“show variables” command list changed vars before not changed vars,

* check  stats and log memo for ds46 (apache#28396)

* [bug](sharedscan) Fix shared scan bug (apache#28841)

* [fix](hash join) fix stack overflow caused by evaluate case expr on huge build block (apache#28851)

* [refactor](executor)remove scan group apache#28847

* [pipelineX](refactor) rename functions (apache#28846)

* [Feature](inverted index) add lowercase option for inverted index analyzer (apache#28704)

* [feature](Nereids) Pull up join from union all (apache#28682)

* [fix](ci) tpch pipeline should not re-load data (apache#28874)

* [fix](ci) tpch pipeline should not re-load data

* 2

---------

Co-authored-by: stephen <hello-stephen@qq.com>

* [exec](compress) use FragmentTransmissionCompressionCodec control the exchange compress behavior (apache#28818)

* [improve](move-memtable) tweak load stream flush token num and max tasks (apache#28884)

* [improve](load) remove extra layer of heavy work pool in tablet_writer_add_block (apache#28550)

* [improve](load) limit delta writer flush task parallelism (apache#28883)

* [fix](multi-catalog)filter impala generated path (apache#28786)

file impala generated dir _imapala_insert_staging

* [enhancement](udf) add prepare function for java-udf (apache#28750)

* [refactor](test)Refactor workload group/schedule policy test apache#28888

[refactor](test)Refactor workload group/schedule policy test
apache#28888

* [improve](move-memtable) avoid using heavy work pool during append data (apache#28745)

* [enhancement](broker-load) fix-move-memtable-session-var-for-s3 (apache#28894)

* [exec](load) change default parallel num from 1 to 8 in no pipeline exec engine (apache#28864)

* [fix](segcompaction) disable segcompaction by default (apache#28906)

Signed-off-by: freemandealer <freeman.zhang1992@gmail.com>

* [fix](pipelineX) fix cannot runtime obtain profile on pipelineX apache#28795

* [fix](mtmv) fix failed to specify the number of buckets when bucket auto (apache#28854)

Issue Number: close #xxx

- fix failed to specify the number of buckets when bucket auto
- delete unused SessionVariable
- if mtmv used external table ,check `isMaterializedViewRewriteEnableContainForeignTable`

* [bugfix](scannercore) scanner will core in deconstructor during collect profile (apache#28727)

* [FIX](map)fix map with rowstore table (apache#28877)

* [feature](mtmv)MTMV pause and resume (apache#28887)

- PAUSE MATERIALIZED VIEW JOB ON mv1
- RESUME MATERIALIZED VIEW JOB ON mv1
- fix when drop db,not drop job
- add lock for one materialized view can only run one task at a time

* [feature](mtmv)add more test case1 (apache#28910)

* [fix](block) add block columns size dcheck (apache#28539)

* [fix](chore) update dcheck to avoid core during stress test (apache#28895)

* [fix](doc) Add the usage example of bos to the documentation of s3 tvf (apache#28899)

* [fix](mtmv)fix can not create mtmv all use default value (apache#28922)

* [fix](parquet) the end offset of column chunk may be wrong in parquet metadata (apache#28891)

* [fix](paimon)fix `like` predicate (apache#28803)

fix like predict

* [fix](merge-on-write) migration may cause duplicate keys for mow table (apache#28923)

* [fix](mtmv) Related partition exclude null generate column when increment build materialized view (apache#28855)

Infer partition column by materialized view partition column, exclude null generate column in join when increment build materialized view

* [nereids] fix join fd computing bug (apache#28849)

* [Fix](statistics) Fix partition name NPE and sample for all table during auto analyze (apache#28916)

Fix partition name NPE and sample for all table during auto analyze.
Sample for all tables because getData may have latency, which may cause full analyze a huge table and use too much resource. Sample for all tables to avoid this. Will improve the strategy later.

* [fix](nereids) Fix query mv rewrite fail when mv cache build quickly (apache#28876)

* [optimize](zonemap) skip zonemap if predicate does not support_zonemap (apache#28595)

* [optimize](zonemap) skip zonemap if predicate does not support_zonemap apache#27608 (apache#28506)

* Revert "[bugfix](scannercore) scanner will core in deconstructor during collect profile (apache#28727)" (apache#28931)

This reverts commit 4066de3.

* [fix] (nereids) Catch exception when mv fail and fix the npe (apache#28932)

* [fix](regression-test) test_partial_update_native_insert_stmt_complex is flaky (apache#28927)

* [improvement](group commit) make get column function more reliable when replaying wal (apache#28900)

* [opt](nereids) convert or to inpredicate and optimize inpredicate partition prune (apache#28316)

* [enhancement](bulk-load) cancel loading tasks directly without retrying when timeout exceeded (apache#28666)

* [chore](test) Add testing util sync point (apache#28924)

* [chore](prompt) Optimize tablet and replica prompt by pointing out what the numbers mean (apache#28925)

* [fix](join) incorrect result of left semi/anti join with empty build side (apache#28898)

* [docs] (DebugPoints) Update docs about Debug Points (apache#28347)


---------

Co-authored-by: qinhao <qinhao@newland.com.cn>

* [feature](api) add profile text api (apache#28697)

* [opt](invert index) Empty strings are not written to the index in the case of TOKENIZED (apache#28822)

* [feature](pipelineX) control exchange sink by memory usage (apache#28814)

* [fix](pipelineX) fix use global rf when there no shared_scans (apache#28869)

* [refactor](pipelineX)do not override dependency() function in pipelineX (apache#28848)

* [fix](log) regularise some BE error type and fix a load task check apache#28729

* [chore](test) correct create table statement (apache#28863)

* [fix](nereids)subquery unnest need handle subquery in Not expr correnctly (apache#28713)

* [feature](nereids)support decimalv2 (apache#28726)

* [fix](nereids)group by expr may be bound twice in bind agg slot (apache#28771)

* [doc](insert) Add group commit docs (apache#25949)

* [performance](variant) support topn 2phase read for variant column (apache#28318)

 [performance](variant) support topn 2phase read for variant column

* return residual expr of join (apache#28760)

* [fix](load) fix nullptr when getting memtable flush running count (apache#28942)

* [fix](load) fix nullptr when getting memtable flush running count

* style

* (enhance)(regression) Support `force_olap_table_replication_num=3` run test_insert_random_distribution_table case (apache#28903)

* [Test](Job)Add test case (apache#28481)

* [fix](doc) typo fix in auto-partition page (apache#28512)

* [feature](load) enable memtable on sink node by default (apache#28963)

* [Chore](Job)print log before task execute (apache#28962)

* [fix](hdfs) Fix HdfsFileSystem::exists_impl crash (apache#28952)

Calling hdfsGetLastExceptionRootCause without initializing ThreadLocalState
will crash. This PR modifies the condition for determining the existence of
a hdfs file, because hdfsExists will set errno to ENOENT when the file does
not exist, we can use this condition to check whether a file existence rather
than check the existence of the root cause.

* [fix](block) fix be core while mutable block merge may cause different row size between columns in origin block (apache#27943)

* [fix](doc) typo fix in dynamic-partition page (apache#28511)

* [fix](hash join) fix column ref DCHECK failure of hash join node block mem reuse (apache#28991)

Introduced by apache#28851, after evaluating build side expr, some columns in resulting block may be referenced more than once in the same block.

e.g. coalesce(col_a, 'string') if col_a is nullable but actually contains no null values, in this case funcition coalesce will insert a new nullable column which references the original col_a.

* [opt](assert_num_rows) support filter in AssertNumRows operator and fix some explain (apache#28935)

* NEED

* Update pipeline x

* fix pipelinex compile

* [fix](parquet_reader) misused bool pointer (apache#28986)

Signed-off-by: pengyu <pengyu@selectdb.com>

* [doc](multi-catalog)add krb and some ertificates FAQs (apache#28858)

add some security docs

* [fix](planner)should save original select list item before analyze (apache#28187)

* [fix](planner)should save original select list item before analyze

* fix test case

* fix failed case

* [bug](storage) Fix gc rowset bug (apache#28979)

* [fix](mtmv)add log for resolve pending task (apache#28999)

* add lock for resolve pending task

* add lock for resolve pending task

* [improvement](nereids) Get partition related table disable nullable field and complete agg matched pattern mv rules. (apache#28973)

* [improvement] (nereids) Get partition related table disable nullable field and modify regression test, complete agg mv rules.

* make filed not null to create partition mv

* [chore](config) modify `tablet_schema_cache_recycle_interval` from 24h to 1h (apache#28980)

To prevent from too many tablet schema cache in memory and lead to performance issue when hold lock
to erase item

* [opt](scanner) optimize the number of threads of scanners (apache#28640)

1. Remove `doris_max_remote_scanner_thread_pool_thread_num`, use `doris_scanner_thread_pool_thread_num` only.
2. Set the default value `doris_scanner_thread_pool_thread_num` as `std::max(48, CpuInfo::num_cores() * 4)`

* [chore](config) modify `variant_ratio_of_defaults_as_sparse_column` from 0.95 to 1 (apache#28984)

since sparse column is not stable at present

* [feature](nereids)support partition property in nereids (apache#28982)

* [feature](Nereids) support table valued function http_stream (apache#29004)

* [feature](Load)(step2)support nereids load job schedule (apache#26356)

We will  Integrate new load job manager into  new job scheduling framework so that the insert into task can be scheduled after the broker load sql  is converted to insert into TVF(table value function) sql.

issue: apache#24221

Now support:
1. load data by tvf insert into sql, but just for simple load(columns need to be defined in the table)
2. show load stmt
- job id, label name, job state, time info
- simple progress
3. cancel load from db
4. support that enable new load through Config.enable_nereids_load
5. can replay job after restarting doris

TODO:
- support partition insert job
- support show statistics from BE
- support multiple task and collect task statistic
- support transactional task
- need add ut case

* [enhance](tablet) Reduce log in tablet meta (apache#28719)

* [fix](case) Add sync to test case (apache#29034)

* [opt](compound) Optimize by deleting the compound expr after obtaining the final result (apache#28934)

* [hotfix](jdbc catalog) fix load table and column names npe (apache#28865)

This fix is for the npe situation that occurs when FE of non-Master nodes initializes Jdbc Catalog metadata.

* [opt](Nereids) support cast bewteen numeric and  boolean in FE (apache#29006)

* [improvement](jdbc catalog) Optimize connection pool caching logic (apache#28859)

In the old caching logic, we only used jdbcurl, user, and password as cache keys. This may cause the old link to be still used when replacing the jar package, so we should concatenate all the parameters required for the connection pool as the key.

* [fix](Nereids) runtime filter push down failed (apache#28997)

project child not always NamedExpression

failed msg
```
org.apache.doris.common.AnalysisException: errCode = 2, detailMessage = class org.apache.doris.nereids.trees.expressions.literal.VarcharLiteral cannot be cast to class org.apache.doris.nereids.trees.expressions.NamedExpression (org.apache.doris.nereids.trees.expressions.literal.VarcharLiteral and org.apache.doris.nereids.trees.expressions.NamedExpression are in unnamed module of loader 'app')
    at org.apache.doris.qe.StmtExecutor.executeByNereids(StmtExecutor.java:623) ~[classes/:?]
    at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:478) ~[classes/:?]
    at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:457) ~[classes/:?]
    at org.apache.doris.qe.ConnectProcessor.handleQuery(ConnectProcessor.java:245) ~[classes/:?]
    at org.apache.doris.qe.MysqlConnectProcessor.handleQuery(MysqlConnectProcessor.java:166) ~[classes/:?]
    at org.apache.doris.qe.MysqlConnectProcessor.dispatch(MysqlConnectProcessor.java:193) ~[classes/:?]
    at org.apache.doris.qe.MysqlConnectProcessor.processOnce(MysqlConnectProcessor.java:246) ~[classes/:?]
    at org.apache.doris.mysql.ReadListener.lambda$handleEvent$0(ReadListener.java:52) ~[classes/:?]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
    at java.lang.Thread.run(Thread.java:829) ~[?:?]
Caused by: java.lang.ClassCastException: class org.apache.doris.nereids.trees.expressions.literal.VarcharLiteral cannot be cast to class org.apache.doris.nereids.trees.expressions.NamedExpression (org.apache.doris.nereids.trees.expressions.literal.VarcharLiteral and org.apache.doris.nereids.trees.expressions.NamedExpression are in unnamed module of loader 'app')
    at org.apache.doris.nereids.trees.plans.physical.PhysicalSetOperation.pushDownRuntimeFilter(PhysicalSetOperation.java:178) ~[classes/:?]
    at org.apache.doris.nereids.trees.plans.physical.PhysicalHashJoin.pushDownRuntimeFilter(PhysicalHashJoin.java:229) ~[classes/:?]
    at org.apache.doris.nereids.processor.post.RuntimeFilterGenerator.pushDownRuntimeFilterCommon(RuntimeFilterGenerator.java:386) ~[classes/:?]
```

* [fix](Nereids) generating function should not folding to NullLiteral (apache#29003)

should not fold table generating function to null when do constant folding.
we should remove Generate node and replaced it by project later.

* [improve](load) add profile for WaitFlushLimitTime (apache#29013)

* [opt](Nereids) let inverted index work with top opt (apache#29000)

* [feature](Nereids) support values inline table in query (apache#28972)

* [enhencement](config) change default memtable size & loadStreamPerNode & default load parallelism (apache#28977)

We change memtable size from 200MB to 100MB to achieve smoother flush
performance. We change loadStreamPerNode from 20 to 60 to avoid stream
rpc to be the bottleneck when enable memtable_on_sink_node. We change
default s3&broker load parallelsim to make the most of CPUs on moderm
multi-core systems.

Signed-off-by: freemandealer <freeman.zhang1992@gmail.com>

* [improve](move-memtable) increase load_stream_flush_token_max_tasks (apache#29011)

* [feature](scan) Implement parallel scanning by dividing the tablets based on the row range (apache#28967)

* [feature](scan) parallel scann on dup/mow mode

* fix bugs

* [refactor](create tablet) default create tablet round robin  (apache#28911)

* [Bug] optimize the collection import Lists dependency packge apache#28523 (apache#28579)

* [fix](regression) Fix flaky test test_partial_update_2pc_schema_change (apache#29037)

* [Bug](security) BE download_files function exists log print sensitive msg apache#28592 (apache#28594)

* Revert "[feature](load) enable memtable on sink node by default (apache#28963)" (apache#29090)

This reverts commit 17917a0.

* [improvement](statistics)Remove retry load when load stats cache fail (apache#28904)

Remove retry load when load stats cache fail. This case usually happens when BE is down or BE OOM, retry doesn't work in these cases and may increase BE work load.

* [fix](pipeline) sort_merge should throw exception in has_next_block if got failed status (apache#29076)

Test in regression-test/suites/datatype_p0/decimalv3/test_decimalv3_overflow.groovy::249 sometimes failed when there are multiple BEs and FE process report status slowly for some reason.

explain select k1, k2, k1 * k2 from test_decimal128_overflow2 order by 1,2,3
--------------

+----------------------------------------------------------------------------------------------------------------------------+
| Explain String(Nereids Planner)                                                                                            |
+----------------------------------------------------------------------------------------------------------------------------+
| PLAN FRAGMENT 0                                                                                                            |
|   OUTPUT EXPRS:                                                                                                            |
|     k1[#5]                                                                                                                 |
|     k2[#6]                                                                                                                 |
|     (k1 * k2)[#7]                                                                                                          |
|   PARTITION: UNPARTITIONED                                                                                                 |
|                                                                                                                            |
|   HAS_COLO_PLAN_NODE: false                                                                                                |
|                                                                                                                            |
|   VRESULT SINK                                                                                                             |
|      MYSQL_PROTOCAL                                                                                                        |
|                                                                                                                            |
|   111:VMERGING-EXCHANGE                                                                                                    |
|      offset: 0                                                                                                             |
|                                                                                                                            |
| PLAN FRAGMENT 1                                                                                                            |
|                                                                                                                            |
|   PARTITION: HASH_PARTITIONED: k1[#0], k2[#1]                                                                              |
|                                                                                                                            |
|   HAS_COLO_PLAN_NODE: false                                                                                                |
|                                                                                                                            |
|   STREAM DATA SINK                                                                                                         |
|     EXCHANGE ID: 111                                                                                                       |
|     UNPARTITIONED                                                                                                          |
|                                                                                                                            |
|   108:VSORT                                                                                                                |
|   |  order by: k1[#5] ASC, k2[#6] ASC, (k1 * k2)[#7] ASC                                                                   |
|   |  offset: 0                                                                                                             |
|   |                                                                                                                        |
|   102:VOlapScanNode                                                                                                        |
|      TABLE: regression_test_datatype_p0_decimalv3.test_decimal128_overflow2(test_decimal128_overflow2), PREAGGREGATION: ON |
|      partitions=1/1 (test_decimal128_overflow2), tablets=8/8, tabletList=22841,22843,22845 ...                             |
|      cardinality=6, avgRowSize=0.0, numNodes=1                                                                             |
|      pushAggOp=NONE                                                                                                        |
|      projections: k1[#0], k2[#1], (k1[#0] * k2[#1])                                                                        |
|      project output tuple id: 1                                                                                            |
+----------------------------------------------------------------------------------------------------------------------------+
36 rows in set (0.03 sec)
Why failed:

Multiple BEs
Fragments 0 and 1 are MUST on different BEs
Pipeline task of VOlapScanNode which executes k1*k2 failed sets query status to cancelled
Pipeline task of VSort call try close, send Cancelled status to VMergeExchange
sort_curso did not throw exception when it meets error

* [feature](Nereids): support infer join when comapring mv (apache#28988)

* [fix](nereids) "not is null" stats estimation fix (apache#28860)

* fix not is null stats

* [opt](nereids)expr normalize after filter pushdown (apache#28743)

normalize expression after filter push down

* [Enhancement](Wal)Support dynamic wal space limit (apache#27726)

* [fix](doc) spell errors fixes query profile docs (apache#28437)

* [opt](Nerieds) add infer props to expression (apache#28953)

* [fix](read) remove logic of estimating count of rows to read in segment iterator to avoid wrong result of unique key. (apache#29109)

* [fix](paimon) read batch by doris' batch size (apache#29039)

* [fix](mtmv)add log for resolve pending task (apache#29078)

* [Refact](inverted index) refactor inverted index writer init (apache#29072)

* [fix](paimon)Remove the static attribute of the source for paimon (apache#29032)

* [fix](planner) Fix delete statement on MOR unique table (apache#28968)

add conditions for mor table removed in apache#26776

* [fix][compile]unused variable (apache#28992)

* [Fix](WorkFlow)Auto replay not work

* [Fix](WorkFlow)Auto replay not work

* [Fix](WorkFlow)Auto replay not work

---------

Signed-off-by: nextdreamblue <zxw520blue1@163.com>
Signed-off-by: freemandealer <freeman.zhang1992@gmail.com>
Signed-off-by: pengyu <pengyu@selectdb.com>
Co-authored-by: lihangyu <15605149486@163.com>
Co-authored-by: Kang <kxiao.tiger@gmail.com>
Co-authored-by: jakevin <jakevingoo@gmail.com>
Co-authored-by: morrySnow <101034200+morrySnow@users.noreply.github.com>
Co-authored-by: xueweizhang <zxw520blue1@163.com>
Co-authored-by: zhangguoqiang <18372634969@163.com>
Co-authored-by: zhangdong <493738387@qq.com>
Co-authored-by: airborne12 <airborne08@gmail.com>
Co-authored-by: Ma1oneZhang <73012001+Ma1oneZhang@users.noreply.github.com>
Co-authored-by: ziyang zhang <zhangziyang@stu.cdut.edu.cn>
Co-authored-by: Siyang Tang <82279870+TangSiyang2001@users.noreply.github.com>
Co-authored-by: Kaijie Chen <ckj@apache.org>
Co-authored-by: Yongqiang YANG <98214048+dataroaring@users.noreply.github.com>
Co-authored-by: yiguolei <676222867@qq.com>
Co-authored-by: minghong <englefly@gmail.com>
Co-authored-by: Jibing-Li <64681310+Jibing-Li@users.noreply.github.com>
Co-authored-by: Gavin Chou <gavineaglechou@gmail.com>
Co-authored-by: plat1ko <platonekosama@gmail.com>
Co-authored-by: wudongliang <46414265+DongLiang-0@users.noreply.github.com>
Co-authored-by: Nitin-Kashyap <66766227+Nitin-Kashyap@users.noreply.github.com>
Co-authored-by: yiguolei <yiguolei@gmail.com>
Co-authored-by: wangbo <wangbo@apache.org>
Co-authored-by: nanfeng <42513321+nanfeng1999@users.noreply.github.com>
Co-authored-by: Xinyi Zou <zouxinyi02@gmail.com>
Co-authored-by: qiye <jianliang5669@gmail.com>
Co-authored-by: DuRipeng <453243496@qq.com>
Co-authored-by: wuwenchi <wuwenchihdu@hotmail.com>
Co-authored-by: Qi Chen <kaka11.chen@gmail.com>
Co-authored-by: Mingyu Chen <morningman@163.com>
Co-authored-by: Xin Liao <liaoxinbit@126.com>
Co-authored-by: yujun <yu.jun.reach@gmail.com>
Co-authored-by: walter <w41ter.l@gmail.com>
Co-authored-by: xy <whuxingying@163.com>
Co-authored-by: xingying01 <xingying01@corp.netease.com>
Co-authored-by: seawinde <149132972+seawinde@users.noreply.github.com>
Co-authored-by: Mryange <59914473+Mryange@users.noreply.github.com>
Co-authored-by: starocean999 <40539150+starocean999@users.noreply.github.com>
Co-authored-by: bobhan1 <bh2444151092@outlook.com>
Co-authored-by: zzzxl <33418555+zzzxl1993@users.noreply.github.com>
Co-authored-by: yangshijie <sjyang2022@zju.edu.cn>
Co-authored-by: zclllyybb <zhaochangle@selectdb.com>
Co-authored-by: amory <wangqiannan@selectdb.com>
Co-authored-by: zhiqiang <seuhezhiqiang@163.com>
Co-authored-by: xy720 <22125576+xy720@users.noreply.github.com>
Co-authored-by: Gabriel <gabrielleebuaa@gmail.com>
Co-authored-by: htyoung <hty551020@hotmail.com>
Co-authored-by: Pxl <pxl290@qq.com>
Co-authored-by: Luwei <814383175@qq.com>
Co-authored-by: meiyi <myimeiyi@gmail.com>
Co-authored-by: Ashin Gau <AshinGau@users.noreply.github.com>
Co-authored-by: HHoflittlefish777 <77738092+HHoflittlefish777@users.noreply.github.com>
Co-authored-by: 谢健 <jianxie0@gmail.com>
Co-authored-by: XuJianxu <xjxlzlpzl@163.com>
Co-authored-by: 胥剑旭 <xujianxu@xujianxudeMacBook-Pro.local>
Co-authored-by: Yoko <53637394+TomaYoko@users.noreply.github.com>
Co-authored-by: huanghaibin <284824253@qq.com>
Co-authored-by: lw112 <131352377+felixwluo@users.noreply.github.com>
Co-authored-by: zhannngchen <48427519+zhannngchen@users.noreply.github.com>
Co-authored-by: Xiangyu Wang <dut.xiangyu@gmail.com>
Co-authored-by: wangxiangyu <wangxiangyu@360shuke.com>
Co-authored-by: AlexYue <yj976240184@gmail.com>
Co-authored-by: TengJianPing <18241664+jacktengg@users.noreply.github.com>
Co-authored-by: xzj7019 <131111794+xzj7019@users.noreply.github.com>
Co-authored-by: Dongyang Li <hello_stephen@qq.com>
Co-authored-by: stephen <hello-stephen@qq.com>
Co-authored-by: HappenLee <happenlee@hotmail.com>
Co-authored-by: slothever <18522955+wsjz@users.noreply.github.com>
Co-authored-by: zhangstar333 <87313068+zhangstar333@users.noreply.github.com>
Co-authored-by: zhengyu <freeman.zhang1992@gmail.com>
Co-authored-by: Jerry Hu <mrhhsg@gmail.com>
Co-authored-by: HowardQin <hao.qin@esgyn.cn>
Co-authored-by: qinhao <qinhao@newland.com.cn>
Co-authored-by: deardeng <565620795@qq.com>
Co-authored-by: caiconghui <55968745+caiconghui@users.noreply.github.com>
Co-authored-by: py023 <137761033+py023@users.noreply.github.com>
Co-authored-by: zy-kkk <zhongyk10@gmail.com>
Co-authored-by: Guangming Lu <71873108+LuGuangming@users.noreply.github.com>
Co-authored-by: abmdocrt <Yukang.Lian2022@gmail.com>
hello-stephen pushed a commit to hello-stephen/doris that referenced this pull request Dec 28, 2023
HappenLee pushed a commit to HappenLee/incubator-doris that referenced this pull request Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by one committer. reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants