Skip to content

[fix](Azure)Fix Azure endpoint detection for sovereign clouds with force-global config support#60903

Open
CalvinKirs wants to merge 3 commits intoapache:masterfrom
CalvinKirs:master-azure
Open

[fix](Azure)Fix Azure endpoint detection for sovereign clouds with force-global config support#60903
CalvinKirs wants to merge 3 commits intoapache:masterfrom
CalvinKirs:master-azure

Conversation

@CalvinKirs
Copy link
Member

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@Thearas
Copy link
Contributor

Thearas commented Feb 28, 2026

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?

@CalvinKirs
Copy link
Member Author

run buildall

1 similar comment
@CalvinKirs
Copy link
Member Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
============================================
q1	17604	4510	4312	4312
q2	q3	10644	782	520	520
q4	4675	355	249	249
q5	7549	1195	1021	1021
q6	167	177	147	147
q7	777	842	674	674
q8	9284	1451	1274	1274
q9	4865	4696	4652	4652
q10	6753	1876	1638	1638
q11	435	262	244	244
q12	689	565	473	473
q13	17758	4240	3426	3426
q14	227	238	216	216
q15	907	788	788	788
q16	712	714	681	681
q17	721	872	431	431
q18	5922	5379	5161	5161
q19	1244	990	606	606
q20	515	500	385	385
q21	4920	2025	1551	1551
q22	366	332	267	267
Total cold run time: 96734 ms
Total hot run time: 28716 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4577	4517	4635	4517
q2	q3	1814	2200	1762	1762
q4	916	1209	807	807
q5	4022	4304	4339	4304
q6	209	181	141	141
q7	1782	1628	1496	1496
q8	2581	2670	2570	2570
q9	7473	7247	7572	7247
q10	2636	2827	2424	2424
q11	512	447	414	414
q12	522	584	450	450
q13	3965	4365	3630	3630
q14	283	317	314	314
q15	900	837	822	822
q16	730	770	697	697
q17	1207	1534	1283	1283
q18	7016	6648	6759	6648
q19	888	899	932	899
q20	2108	2206	2149	2149
q21	3928	3451	3372	3372
q22	468	425	378	378
Total cold run time: 48537 ms
Total hot run time: 46324 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 183370 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 1594b1e59d3a67844c7f8a8ed9b74e9c72d70488, data reload: false

query5	5646	649	522	522
query6	328	217	204	204
query7	4216	458	263	263
query8	341	236	227	227
query9	8755	2750	2707	2707
query10	537	382	330	330
query11	16879	17479	16961	16961
query12	209	134	120	120
query13	1362	477	353	353
query14	8349	3339	3082	3082
query14_1	2989	2944	2953	2944
query15	214	197	181	181
query16	1057	418	491	418
query17	1527	775	653	653
query18	2750	448	348	348
query19	223	210	185	185
query20	139	128	137	128
query21	230	135	117	117
query22	4754	5033	4755	4755
query23	17205	16863	16558	16558
query23_1	16571	16707	16716	16707
query24	6786	1620	1220	1220
query24_1	1221	1218	1232	1218
query25	564	488	459	459
query26	1239	255	145	145
query27	2759	459	279	279
query28	4529	1875	1853	1853
query29	777	553	468	468
query30	313	255	210	210
query31	847	728	641	641
query32	80	69	69	69
query33	504	329	283	283
query34	903	907	565	565
query35	625	676	593	593
query36	1073	1090	985	985
query37	141	90	86	86
query38	2969	2920	2865	2865
query39	871	891	854	854
query39_1	846	827	829	827
query40	233	151	133	133
query41	61	59	58	58
query42	107	105	104	104
query43	371	383	362	362
query44	
query45	201	189	181	181
query46	875	985	601	601
query47	2101	2133	2049	2049
query48	312	321	235	235
query49	626	453	381	381
query50	673	284	215	215
query51	4107	4131	4051	4051
query52	105	106	98	98
query53	294	326	283	283
query54	302	263	251	251
query55	93	84	78	78
query56	313	300	321	300
query57	1348	1328	1248	1248
query58	291	274	275	274
query59	2613	2721	2558	2558
query60	341	329	323	323
query61	149	145	144	144
query62	626	584	547	547
query63	313	277	272	272
query64	4828	1261	983	983
query65	
query66	1368	445	374	374
query67	16318	16364	16385	16364
query68	
query69	394	304	302	302
query70	958	955	972	955
query71	331	310	295	295
query72	2773	2602	2398	2398
query73	541	543	327	327
query74	10023	9930	9792	9792
query75	2862	2736	2440	2440
query76	2250	1038	672	672
query77	366	385	335	335
query78	11283	11481	10751	10751
query79	1167	792	601	601
query80	1388	609	543	543
query81	556	289	246	246
query82	1005	147	116	116
query83	339	257	245	245
query84	252	111	102	102
query85	906	485	425	425
query86	461	309	296	296
query87	3124	3086	3039	3039
query88	3508	2686	2658	2658
query89	426	366	350	350
query90	1952	177	175	175
query91	161	157	132	132
query92	78	71	72	71
query93	990	823	504	504
query94	644	314	280	280
query95	561	411	314	314
query96	623	526	227	227
query97	2476	2479	2395	2395
query98	233	221	214	214
query99	1017	979	915	915
Total cold run time: 255415 ms
Total hot run time: 183370 ms

}

private static final String AZURE_ENDPOINT_SUFFIX = ".blob.core.windows.net";
private static final String[] AZURE_ACCOUNT_KEY_ENDPOINTS = {
Copy link
Contributor

Choose a reason for hiding this comment

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

why not read from config?
Making it configurable with default list will make it extensible.

[fix](Azure)Fix Azure endpoint detection for sovereign clouds with force-global config support
@CalvinKirs
Copy link
Member Author

run buildall

# Conflicts:
#	fe/fe-common/src/main/java/org/apache/doris/common/Config.java
@CalvinKirs
Copy link
Member Author

run buildall

@doris-robot
Copy link

Cloud UT Coverage Report

Increment line coverage 0.00% (0/3) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 79.34% (1797/2265)
Line Coverage 64.76% (32182/49694)
Region Coverage 65.65% (16115/24547)
Branch Coverage 56.15% (8586/15292)

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 64.58% (31/48) 🎉
Increment coverage report
Complete coverage report

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
============================================
q1	17635	4460	4323	4323
q2	q3	10637	848	529	529
q4	4713	366	256	256
q5	7822	1216	1008	1008
q6	208	178	148	148
q7	800	864	676	676
q8	10637	1447	1303	1303
q9	5923	4791	4774	4774
q10	6845	1895	1636	1636
q11	462	268	235	235
q12	738	565	469	469
q13	17807	4227	3436	3436
q14	238	236	216	216
q15	949	811	792	792
q16	762	729	690	690
q17	752	899	414	414
q18	6425	5473	5339	5339
q19	1230	978	625	625
q20	570	719	439	439
q21	4637	1934	1425	1425
q22	366	307	272	272
Total cold run time: 100156 ms
Total hot run time: 29005 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4728	4561	4527	4527
q2	q3	1881	2256	1777	1777
q4	865	1176	757	757
q5	4063	4381	4424	4381
q6	191	172	142	142
q7	1773	1679	1531	1531
q8	2524	2768	2655	2655
q9	7478	7387	7671	7387
q10	2602	2799	2429	2429
q11	493	448	521	448
q12	528	607	437	437
q13	3952	4508	3591	3591
q14	285	289	269	269
q15	872	810	795	795
q16	722	789	728	728
q17	1261	1601	1301	1301
q18	7224	6707	6613	6613
q19	885	852	889	852
q20	2095	2206	2026	2026
q21	4014	3484	3348	3348
q22	463	446	382	382
Total cold run time: 48899 ms
Total hot run time: 46376 ms

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Mar 3, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

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

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

PR approved by anyone and no changes requested.

@doris-robot
Copy link

TPC-DS: Total hot run time: 184631 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 38af3c2452cf988d3298c2f895c0d04d357e4241, data reload: false

query5	4320	660	521	521
query6	333	223	250	223
query7	4217	489	292	292
query8	357	248	241	241
query9	8754	2787	2769	2769
query10	487	389	364	364
query11	16972	17439	17410	17410
query12	200	150	132	132
query13	1521	484	357	357
query14	6811	3392	3190	3190
query14_1	2967	2999	2976	2976
query15	208	214	208	208
query16	998	512	483	483
query17	1219	766	660	660
query18	2739	486	357	357
query19	229	223	193	193
query20	144	137	134	134
query21	221	150	128	128
query22	5754	5612	5091	5091
query23	17334	16854	16538	16538
query23_1	16763	16767	16723	16723
query24	7184	1628	1242	1242
query24_1	1237	1248	1243	1243
query25	567	480	438	438
query26	1242	264	159	159
query27	2743	473	333	333
query28	4450	1867	1889	1867
query29	772	574	470	470
query30	306	251	212	212
query31	874	745	657	657
query32	83	76	71	71
query33	512	345	276	276
query34	935	914	569	569
query35	630	697	594	594
query36	1079	1129	982	982
query37	138	95	89	89
query38	2958	2913	2854	2854
query39	879	868	860	860
query39_1	821	814	808	808
query40	238	156	133	133
query41	65	60	60	60
query42	105	102	102	102
query43	376	381	357	357
query44	
query45	195	189	187	187
query46	886	987	622	622
query47	2142	2122	2068	2068
query48	315	335	247	247
query49	630	465	386	386
query50	690	268	220	220
query51	4135	4117	4015	4015
query52	109	109	98	98
query53	298	341	292	292
query54	331	269	265	265
query55	88	87	87	87
query56	324	311	325	311
query57	1377	1334	1274	1274
query58	298	276	289	276
query59	2559	2629	2525	2525
query60	353	345	331	331
query61	161	150	153	150
query62	641	599	540	540
query63	316	276	278	276
query64	4914	1278	1012	1012
query65	
query66	1426	459	356	356
query67	16475	16458	16291	16291
query68	
query69	409	313	292	292
query70	1005	961	943	943
query71	353	305	306	305
query72	2818	2652	2461	2461
query73	563	555	318	318
query74	9942	10000	9706	9706
query75	2863	2785	2464	2464
query76	2291	1037	673	673
query77	367	389	314	314
query78	11148	11376	10650	10650
query79	2939	827	591	591
query80	1798	645	592	592
query81	572	278	246	246
query82	997	145	116	116
query83	331	264	242	242
query84	251	121	100	100
query85	895	472	430	430
query86	406	330	303	303
query87	3103	3085	2985	2985
query88	3538	2660	2642	2642
query89	442	383	343	343
query90	2020	181	173	173
query91	167	161	133	133
query92	89	80	70	70
query93	1338	847	507	507
query94	649	328	296	296
query95	594	391	311	311
query96	658	533	233	233
query97	2498	2485	2398	2398
query98	240	224	226	224
query99	997	1000	919	919
Total cold run time: 257048 ms
Total hot run time: 184631 ms

if (s3_conf.endpoint.find("://") == std::string::npos) {
uri = "https://" + uri;
}
std::string uri = fmt::format("{}/{}", s3_conf.endpoint, container_name);
Copy link
Contributor

Choose a reason for hiding this comment

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

strip the trailing / of the URI to increase robustness

Copy link
Member Author

Choose a reason for hiding this comment

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

If necessary, this should be placed in normalized_uri.

if (uri_.find("://") == std::string::npos) {
uri_ = "https://" + uri_;
}
uri_ = fmt::format("{}/{}", conf_.endpoint, conf_.bucket);
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

})
public static boolean force_azure_blob_global_endpoint = false;
public static String[] azure_blob_host_suffixes = {
".blob.core.windows.net",
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need to keep both
.dfs and .blob?

why not sth like just core.winodows.com?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is required by the HDFS style guidelines.

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 0.00% (0/3) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.58% (19642/37354)
Line Coverage 36.22% (183468/506551)
Region Coverage 32.49% (142235/437743)
Branch Coverage 33.45% (61696/184438)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 0.00% (0/3) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 71.57% (26176/36576)
Line Coverage 54.39% (274678/504998)
Region Coverage 51.88% (229233/441880)
Branch Coverage 53.07% (98174/185002)

@hello-stephen
Copy link
Contributor

FE Regression Coverage Report

Increment line coverage 29.17% (14/48) 🎉
Increment coverage report
Complete coverage report

yiguolei pushed a commit that referenced this pull request Mar 4, 2026
@yiguolei yiguolei mentioned this pull request Mar 7, 2026
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. dev/3.1.x dev/4.0.4-merged reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants