Skip to content

Conversation

@github-actions
Copy link
Contributor

Cherry-picked from #53104

…53104)

### What problem does this PR solve?

Issue Number: close #xxx

Related PR: #42881

Problem Summary:

Supports flexible endpoint configuration for Stream Load operations,
allowing you to control how load requests are redirected.

## BE Support multiple addresses

Each Doris BE node now supports three types of addresses:
- `be_host`: used for internal communication within the Doris cluster.
- `public_endpoint`: used for external public access.
- `private_endpoint`: used for external private access.

All three addresses can be selected as the target for Stream Load
operations.
## Redirect Policies
When sending Stream Load requests, you can specify a redirect policy
using the `redirect-policy` header. Available policies are:

- `direct`: Redirects to the backend's host.
- `public`: Redirects to the public endpoint of the backend.
 - `private`: Redirects to the private endpoint of the backend.
- `""` (empty/default): If request host equals to backend's public
endpoint, redirects to the public endpoint.
If private endpoint of backend is set, redirects to the private
endpoint. Otherwise, redirects to the backend's host.

## Configuration Methods

```sql
-- Add/Modify BE with custom endpoints
ALTER SYSTEM ADD BACKEND 'be_host1:heartbeat_port1', 'be_host2:heartbeat_port2' properties(
    'tag.public_endpoint' = '11.10.10.10:8010',
    'tag.private_endpoint' = '10.10.10.9:8020'
);
ALTER SYSTEM MODIFY BACKEND 'be_host1:heartbeat_port1', 'be_host2:heartbeat_port2' SET (
    'tag.public_endpoint' = '11.10.10.10:8010',
    'tag.private_endpoint' = '10.10.10.9:8020'
);
```
@github-actions github-actions bot requested a review from morrySnow as a code owner July 14, 2025 10:08
@hello-stephen
Copy link
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@dataroaring dataroaring reopened this Jul 14, 2025
@hello-stephen
Copy link
Contributor

run buildall

@doris-robot
Copy link

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 81.13% (1187/1463)
Line Coverage 65.41% (20600/31494)
Region Coverage 66.77% (10429/15620)
Branch Coverage 56.56% (5509/9740)

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 45.22% (12508/27662)
Line Coverage 36.12% (111085/307550)
Region Coverage 35.24% (57475/163073)
Branch Coverage 32.34% (31198/96468)

@doris-robot
Copy link

TPC-H: Total hot run time: 39956 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 658468afaa8f328e8fb26ef7f0e24a0378242553, data reload: false

------ Round 1 ----------------------------------
q1	17832	7379	6650	6650
q2	2076	167	166	166
q3	10657	1153	1254	1153
q4	10455	725	737	725
q5	7736	2954	2901	2901
q6	218	138	136	136
q7	1023	636	628	628
q8	9380	1985	2032	1985
q9	6633	6383	6402	6383
q10	6974	2247	2314	2247
q11	448	265	256	256
q12	398	225	218	218
q13	17770	3007	3019	3007
q14	228	215	230	215
q15	497	466	461	461
q16	440	389	374	374
q17	999	609	551	551
q18	7413	6638	6684	6638
q19	1321	992	943	943
q20	497	208	212	208
q21	4075	3142	3124	3124
q22	1099	987	1006	987
Total cold run time: 108169 ms
Total hot run time: 39956 ms

----- Round 2, with runtime_filter_mode=off -----
q1	6616	6565	6581	6565
q2	327	249	233	233
q3	2916	3002	2937	2937
q4	2072	1810	1773	1773
q5	5724	5725	5723	5723
q6	203	126	129	126
q7	2263	1761	1833	1761
q8	3409	3549	3623	3549
q9	8797	8952	8836	8836
q10	3552	3559	3536	3536
q11	597	504	503	503
q12	855	628	615	615
q13	6697	3137	3142	3137
q14	291	279	292	279
q15	508	477	466	466
q16	489	453	445	445
q17	1861	1633	1599	1599
q18	8272	7802	7793	7793
q19	1703	1533	1498	1498
q20	2077	1815	1862	1815
q21	5208	5132	5004	5004
q22	1142	1087	1057	1057
Total cold run time: 65579 ms
Total hot run time: 59250 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 197959 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 658468afaa8f328e8fb26ef7f0e24a0378242553, data reload: false

query1	1328	925	920	920
query2	6320	1923	1863	1863
query3	10990	4502	4634	4502
query4	33429	23610	24024	23610
query5	4535	474	456	456
query6	278	194	207	194
query7	4007	328	331	328
query8	295	247	232	232
query9	9433	2615	2612	2612
query10	490	266	267	266
query11	18117	15288	15322	15288
query12	152	106	107	106
query13	1565	426	415	415
query14	8760	6669	7584	6669
query15	245	188	185	185
query16	8054	515	500	500
query17	1632	599	576	576
query18	2158	319	312	312
query19	207	167	159	159
query20	123	113	115	113
query21	207	112	119	112
query22	4799	4497	4453	4453
query23	35302	34790	33776	33776
query24	11328	3092	3078	3078
query25	538	415	402	402
query26	764	185	171	171
query27	2488	350	358	350
query28	7377	2182	2183	2182
query29	709	465	460	460
query30	257	184	170	170
query31	1055	842	874	842
query32	98	60	58	58
query33	788	333	340	333
query34	948	525	544	525
query35	869	755	733	733
query36	1092	964	930	930
query37	110	76	74	74
query38	4027	3958	4045	3958
query39	1525	1457	1501	1457
query40	235	116	114	114
query41	55	51	49	49
query42	119	106	106	106
query43	529	497	484	484
query44	1294	857	832	832
query45	192	171	183	171
query46	1228	781	778	778
query47	2051	1896	1917	1896
query48	472	371	360	360
query49	940	422	416	416
query50	882	449	440	440
query51	7825	7311	7345	7311
query52	107	99	95	95
query53	274	192	191	191
query54	1239	510	531	510
query55	80	88	84	84
query56	277	261	257	257
query57	1342	1233	1197	1197
query58	237	222	223	222
query59	3221	3047	3030	3030
query60	295	264	271	264
query61	110	110	109	109
query62	850	701	696	696
query63	237	203	209	203
query64	5209	665	677	665
query65	3338	3312	3299	3299
query66	1259	308	305	305
query67	16217	15487	15558	15487
query68	4453	585	580	580
query69	451	276	270	270
query70	1177	1140	1098	1098
query71	391	264	268	264
query72	6044	4121	4028	4028
query73	821	373	363	363
query74	10545	9234	9195	9195
query75	3415	2697	2724	2697
query76	2378	1117	1178	1117
query77	395	274	281	274
query78	10640	9603	9535	9535
query79	1372	623	604	604
query80	939	453	439	439
query81	546	221	219	219
query82	986	93	93	93
query83	237	141	147	141
query84	239	96	91	91
query85	1292	302	292	292
query86	388	308	312	308
query87	4378	4253	4270	4253
query88	3519	2472	2422	2422
query89	425	302	312	302
query90	1856	192	189	189
query91	144	109	108	108
query92	64	54	54	54
query93	1554	574	579	574
query94	790	306	309	306
query95	360	266	271	266
query96	647	287	284	284
query97	3349	3144	3150	3144
query98	215	206	210	206
query99	1503	1302	1307	1302
Total cold run time: 302026 ms
Total hot run time: 197959 ms

@doris-robot
Copy link

ClickBench: Total hot run time: 32.23 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 658468afaa8f328e8fb26ef7f0e24a0378242553, data reload: false

query1	0.03	0.03	0.03
query2	0.10	0.04	0.05
query3	0.24	0.06	0.05
query4	1.63	0.09	0.08
query5	0.53	0.50	0.52
query6	1.13	0.75	0.74
query7	0.02	0.01	0.01
query8	0.05	0.05	0.04
query9	0.55	0.50	0.50
query10	0.55	0.56	0.58
query11	0.17	0.12	0.13
query12	0.16	0.13	0.13
query13	0.62	0.61	0.60
query14	0.81	0.80	0.81
query15	0.87	0.88	0.85
query16	0.38	0.38	0.37
query17	1.06	1.09	1.10
query18	0.19	0.19	0.19
query19	1.89	1.89	1.88
query20	0.02	0.01	0.01
query21	15.42	0.69	0.68
query22	3.52	6.80	2.92
query23	18.22	1.36	1.41
query24	2.17	0.26	0.26
query25	0.16	0.09	0.10
query26	0.28	0.18	0.18
query27	0.08	0.09	0.07
query28	13.22	0.62	0.58
query29	12.64	3.38	3.35
query30	0.25	0.06	0.05
query31	2.86	0.41	0.40
query32	3.22	0.49	0.49
query33	2.99	3.01	3.05
query34	16.79	4.54	4.53
query35	4.59	4.58	4.65
query36	0.67	0.47	0.50
query37	0.19	0.16	0.17
query38	0.17	0.15	0.14
query39	0.05	0.04	0.04
query40	0.17	0.13	0.14
query41	0.10	0.05	0.05
query42	0.07	0.06	0.05
query43	0.05	0.06	0.05
Total cold run time: 108.88 s
Total hot run time: 32.23 s

@morrySnow morrySnow merged commit 01a54a0 into branch-3.1 Jul 15, 2025
20 of 22 checks passed
@github-actions github-actions bot deleted the auto-pick-53104-branch-3.1 branch July 15, 2025 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants