Skip to content

[feature](s3) Support S3 Express One Zone#65504

Open
0AyanamiRei wants to merge 25 commits into
apache:masterfrom
0AyanamiRei:take-over-63409
Open

[feature](s3) Support S3 Express One Zone#65504
0AyanamiRei wants to merge 25 commits into
apache:masterfrom
0AyanamiRei:take-over-63409

Conversation

@0AyanamiRei

@0AyanamiRei 0AyanamiRei commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: None

Related PR: #63409

Problem Summary:

Doris import paths need to read existing Amazon S3 Express One Zone directory buckets with AWS SDK-managed session authentication and zonal endpoint resolution.

This PR supports S3 Express through the existing Doris S3 import entry points:

  • SELECT ... FROM S3(...).
  • INSERT INTO ... SELECT ... FROM S3(...).
  • Broker Load using WITH S3.

No new storage object or user-managed short-term credential is introduced. Users keep configuring the long-term AWS credential path already supported by Doris, and the AWS SDK creates and refreshes the S3 Express session credentials.

Supported URI forms

S3 Express is selected when s3.provider (or provider) is explicitly AWS and the request uses a complete directory-bucket name, <bucket-base>--<zone-id>--x-s3.

The supported input forms are:

  1. A canonical S3 Express Object URL:

    https://<bucket-base>--<zone-id>--x-s3.s3express-<zone-id>.<region>.amazonaws.com/<key>
    

    For S3 TVF, Doris derives s3.region from this URL when it is omitted. Doris normalizes the URL to s3://<directory-bucket>/<key> before file discovery and execution.

  2. The existing S3 URI form:

    s3://<bucket-base>--<zone-id>--x-s3/<key>
    

    This form requires s3.region as before.

Broker Load still requires a shared s3.region in WITH S3, because its BrokerDesc is created before the DATA INFILE paths and can be shared by multiple paths. Multiple Object URLs in the same Region are supported; a URL whose Region conflicts with the shared configuration is rejected.

For a complete Object URL, Doris validates HTTPS, the canonical virtual-hosted endpoint form, the directory-bucket name, matching bucket/endpoint Zone IDs, matching URL/configured Regions, and use_path_style=false. Canonical non-dualstack Object URLs are supported; dualstack URLs are rejected because the dualstack hostname choice is not propagated after URI normalization.

s3.endpoint may be omitted. The Express clients ignore endpoint overrides and let the AWS SDK derive the zonal data endpoint from the complete directory-bucket name, so an endpoint retained for ordinary S3 configuration does not conflict with Express imports.

Implementation

  • There is no statement-local flag or hidden S3_EXPRESS_IMPORT_READ property. S3 TVF SELECT and INSERT INTO SELECT use the same construction path.
  • FE file discovery and reads (ListObjectsV2, HeadObject, and GetObject) select the SDK-managed Express client for AWS directory buckets.
  • Directory-bucket listing uses slash-terminated prefixes and continuation tokens and does not use unsupported StartAfter requests.
  • BE uses the AWS SDK S3 endpoint provider with S3 Express authentication enabled, HTTPS, and virtual-hosted addressing.
  • Broker Load keeps its normal BrokerDesc and replay path; complete Object URLs are normalized through the same typed S3 property path.
  • Ordinary S3 and non-AWS S3-compatible providers keep their existing client and endpoint behavior.
  • The supported and tested user-facing scope is importing existing objects; this PR does not add a storage-creation or export interface.

Release note

Support importing existing Amazon S3 Express One Zone objects through S3 TVF queries, INSERT INTO ... SELECT ... FROM S3(...), and Broker Load WITH S3, using either a canonical S3 Express Object URL or a directory-bucket s3:// URI.

Check List (For Author)

  • Test

    • Regression test
      • Added aws_s3_express_p0/test_s3_express_import, gated by enableS3ExpressOneZoneTest, for canonical Object URLs, s3:// URIs, S3 TVF, INSERT INTO SELECT, Broker Load, CSV, Parquet, ORC, multi-path/glob discovery, and 1001-object pagination.
      • The expected .out must be generated on a real AWS directory bucket with -genOut, then verified by a second run without -genOut.
    • Unit Test
      • ./run-fe-ut.sh --run org.apache.doris.datasource.property.storage.S3PropertiesTest,org.apache.doris.tablefunction.ExternalFileTableValuedFunctionTest,org.apache.doris.nereids.trees.plans.commands.LoadCommandTest (37 tests passed)
      • ./run-fe-ut.sh --run org.apache.doris.tablefunction.ExternalFileTableValuedFunctionTest (4 tests passed after the final file-list path assertion)
    • Manual test
    • A live AWS directory-bucket CreateSession -> List/Get integration test has not run yet; Regression and Manual remain unchecked until the AWS run passes and the generated .out is committed.
  • Behavior changed:

    • Yes. AWS directory buckets automatically select the S3 Express client in the supported S3 import paths, and canonical S3 Express Object URLs are accepted and validated.
  • Does this need documentation?

    • Yes. A follow-up documentation PR should describe the URI forms, Broker Load Region requirement, and supported import entry points.

Check List (For Reviewer who merge this PR)

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

yinzixin and others added 3 commits July 13, 2026 09:22
### What problem does this PR solve?\n\nIssue Number: close #xxx\n\nRelated PR: apache#63409\n\nProblem Summary: The initial S3 Express implementation detected directory buckets and endpoints with broad substring matches in two separate locations. This could classify ordinary bucket names or endpoint paths as S3 Express and allowed the client configuration and upload checksum behavior to diverge. Centralize the decision in one helper, require the documented --x-s3 bucket suffix or an s3express endpoint host label, and pass the resulting context into the object storage client. Add unit coverage for valid and invalid names.\n\n### Release note\n\nNone\n\n### Check List (For Author)\n\n- Test: Unit Test (S3UTILTest.is_s3_express_context; ASAN UT rebuild started)\n- Behavior changed: No, except avoiding false-positive S3 Express detection\n- Does this need documentation: No
@hello-stephen

Copy link
Copy Markdown
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?

@0AyanamiRei
0AyanamiRei marked this pull request as ready for review July 13, 2026 01:38
### What problem does this PR solve?

Issue Number: N/A

Related PR: apache#63409

Problem Summary: Document a production-ready design for S3 Express One Zone on Doris. The design audits the current PR, defines service-aware bucket capabilities, preserves ordinary S3 endpoint behavior, completes checksum and multipart flows across BE and FE, specifies unordered listing compatibility, rejects unsupported Cloud and Hadoop surfaces before I/O or persistence, and provides test, rollout, and data rollback gates.

### Release note

None

### Check List (For Author)

- Test: No need to test (documentation-only change; validated with git diff --cached --check and source-path consistency checks)

- Behavior changed: No

- Does this need documentation: No (this commit is the implementation design)
### What problem does this PR solve?

Issue Number: None

Related PR: apache#63409

Problem Summary: Add end-to-end S3 Express One Zone Directory Bucket support across native BE and FE S3 paths. Use SDK-managed session authentication and zonal endpoint routing, CRC32C multipart propagation, Directory Bucket listing semantics, active multipart cleanup, and fail-fast gates for unsupported Cloud Storage Vault and Hadoop/S3A surfaces while preserving ordinary S3-compatible behavior.

### Release note

Add native S3 Express One Zone Directory Bucket support for Doris S3 file access. Cloud Storage Vault, Hadoop/S3A-backed external surfaces, and presigned URLs remain unsupported and fail fast.

### Check List (For Author)

- Test: Test code added but not run per request
- Behavior changed: Yes. Official AWS Directory Buckets use SDK-managed Express session authentication, CRC32C, and Directory Bucket listing semantics; unsupported surfaces fail fast.
- Does this need documentation: Yes, goal.md
### What problem does this PR solve?

Issue Number: None

Related PR: apache#63409

Problem Summary: Document how the S3 Express One Zone design maps to the implemented BE, FE, Hive, Cloud boundary, checksum, multipart, listing, and fail-fast changes. Record compatibility behavior, unexecuted tests, and remaining validation gaps so the implementation status is not confused with GA acceptance.

### Release note

None

### Check List (For Author)

- Test: No need to test (documentation-only change)
- Behavior changed: No
- Does this need documentation: Yes, this commit adds the implementation summary
### What problem does this PR solve?

Issue Number: None

Related PR: apache#63409

Problem Summary: The previous S3 Express implementation expanded Directory Bucket awareness across listing, deletion, presigning, connectors, Cloud storage, checksums, and documentation. This change narrows support to official AWS endpoints and valid --x-s3 bucket names on Doris native known-object paths. AWS SDK endpoint rules provide the zonal endpoint and CreateSession authentication, Express clients use HTTPS and virtual-hosted addressing, Head/Get/range/Put and multipart create/upload/complete/abort are supported, exact S3 TVF and S3 Load paths use HeadObject, and Express uploads no longer send Content-MD5. General-purpose S3 and S3-compatible endpoints retain their existing client behavior.

### Release note

Support native known-object reads and writes for Amazon S3 Express One Zone Directory Buckets.

### Check List (For Author)

- Test: Not run (per user request)
- Behavior changed: Yes. Official AWS Directory Buckets use SDK S3 Express routing and session authentication for native known-object operations.
- Does this need documentation: Yes. The user documentation will be handled separately.
### What problem does this PR solve?

Issue Number: None

Related PR: apache#63409

Problem Summary: Align S3 Express support with the documented known-object contract. Only valid AWS Directory Buckets using a standard HTTPS regional endpoint, a matching region, and virtual-hosted-style access enable SDK endpoint rules and CreateSession. Exact S3 TVF and Broker Load paths use HeadObject and reject glob, range, query, empty-key, and directory-prefix inputs. Third-party S3-compatible endpoints retain conventional S3 authentication and checksum behavior even when a bucket name ends in --x-s3. BE known-object uploads omit Content-MD5 for Directory Buckets. Remove the prior generic Java operation and BE abort expansions. The existing SDK versions already provide the required endpoint and session APIs, so no SDK upgrade is included.

### Release note

Support known-object access to Amazon S3 Express One Zone through native S3 paths.

### Check List (For Author)

- Test: Not run (per user request)
- Behavior changed: Yes. Valid AWS Directory Buckets use S3 Express session authentication for known-object access; unsupported listing and glob semantics are not enabled.
- Does this need documentation: Yes. The user documentation is handled separately.
### What problem does this PR solve?

Issue Number: None

Related PR: apache#65504

Problem Summary: Synchronize the S3 Express branch with the latest master so the import-layer refactor and its unit tests use the current S3 filesystem interfaces.

### Release note

None

### Check List (For Author)

- Test: No need to test (base branch synchronization only)
- Behavior changed: No
- Does this need documentation: No
### What problem does this PR solve?

Issue Number: None

Related PR: apache#65504

Problem Summary: Amazon S3 Express One Zone directory buckets require directory-bucket listing rules and SDK-managed session authentication, while the existing S3 import paths used regular S3 clients. Scope the capability to one-shot INSERT SELECT from the S3 table-valued source and Broker Load WITH S3, validate native AWS directory-bucket context, select Express clients for discovery and reads, and preserve ordinary, third-party, legacy, and non-target import behavior.

### Release note

Support importing from Amazon S3 Express One Zone directory buckets through one-shot INSERT SELECT S3 sources and Broker Load WITH S3.

### Check List (For Author)

- Test: Unit Test
    - FE core targeted unit tests
    - FE filesystem targeted unit tests
    - BE targeted unit tests
- Behavior changed: Yes, S3 Express reads are enabled only for the two scoped S3 import entry points.
- Does this need documentation: Yes (follow-up documentation PR pending)
### What problem does this PR solve?

Issue Number: None

Related PR: apache#63409

Problem Summary: The previous S3 Express implementation inferred directory-bucket behavior from user endpoints and changed generic S3/import abstractions beyond the intended feature. This refactor limits S3 Express selection to trusted one-shot INSERT SELECT and Broker Load read paths with an explicit AWS provider and a complete directory bucket name. Doris ignores the user endpoint for these scoped reads, derives known Regions from the bucket Zone ID, falls back to an unchecked user Region for future Zone prefixes, and lets the AWS SDK resolve the zonal endpoint and manage S3 Express session credentials. Ordinary S3 and non-target import, catalog, resource, storage, and write paths retain their existing behavior.

### Release note

Add S3 Express One Zone read support for one-shot INSERT SELECT from S3 and Broker Load with S3. Provide the complete directory bucket name and AWS provider; endpoint is ignored, while region is used only as an unchecked fallback for an unknown Zone prefix.

### Check List (For Author)

- Test: Unit Test
    - BE S3ClientFactoryTest: 12 tests passed
    - FE targeted S3 Express and import tests: 196 tests passed
- Behavior changed: Yes. Only the scoped S3 import reads select SDK-managed S3 Express endpoint and session authentication.
- Does this need documentation: Yes. The PR description documents the supported entry points and configuration contract.
### What problem does this PR solve?

Issue Number: None

Related PR: apache#63409

Problem Summary: The S3 Express statement-scope gate only admitted INSERT INTO SELECT and excluded a direct SELECT from the same S3 TVF, even though both statements share the same FE listing and BE read path. The gate also called Command.getType() for a real InsertIntoTableCommand, but Command does not implement that method. Recognize only the exact one-shot InsertIntoTableCommand and the parser's UnboundResultSink for a direct SELECT. This keeps CTAS, INSERT OVERWRITE, OUTFILE, COPY, FILE TVF, Streaming, internal commands, and specialized INSERT subclasses outside the trusted S3 Express marker boundary.

### Release note

Support reading an Amazon S3 Express One Zone directory bucket with a direct SELECT from S3(...) in addition to INSERT INTO ... SELECT ... FROM S3(...) and Broker Load WITH S3.

### Check List (For Author)

- Test: Unit Test
    - ./run-fe-ut.sh --run org.apache.doris.common.util.S3URITest,org.apache.doris.datasource.property.storage.S3PropertiesTest,org.apache.doris.fs.FileSystemFactoryS3ExpressScopeTest,org.apache.doris.load.loadv2.BrokerLoadJobTest,org.apache.doris.nereids.trees.plans.commands.LoadCommandTest,org.apache.doris.tablefunction.ExternalFileTableValuedFunctionTest,org.apache.doris.qe.S3ExpressImportScopeTest (58 tests passed)
- Behavior changed: Yes. Direct one-shot SELECT from the S3 TVF can select the scoped S3 Express read client; non-target entry points remain excluded.
- Does this need documentation: Yes. The PR description documents the supported entry points and configuration contract.
### What problem does this PR solve?

Issue Number: None

Related PR: apache#65504

Problem Summary: S3 Express import requests whose bucket clearly uses the --x-s3 suffix could silently fall back to generic S3-compatible provider detection when the statement scope, provider, or directory bucket format was invalid. This produced misleading MinIO or ordinary S3 errors. FE list failures also lost AWS service details and incorrectly implied a specific CreateSession or ListObjectsV2 stage. Recognize S3 Express intent before fallback, validate only the supported import entry points, and preserve HTTP status, AWS error code, message, and request ID with joint operation context.

### Release note

S3 Express import requests now report clear scope, provider, bucket-format, and FE service errors instead of silently falling back to ordinary S3-compatible handling.

### Check List (For Author)

- Test: Unit Test
    - FE unit tests for S3 Express intent validation, TVF and Broker Load scope, and S3 filesystem error reporting
- Behavior changed: Yes. Invalid S3 Express import requests now fail with feature-specific diagnostics.
- Does this need documentation: No
@0AyanamiRei

Copy link
Copy Markdown
Contributor Author

run buildall

### What problem does this PR solve?

Issue Number: None

Related PR: apache#65504

Problem Summary: FileSystemFactoryS3ExpressScopeTest used nonstandard line wrapping in the ASF license header. FE Checkstyle rejected the header and blocked the Compile, FE UT, and Performance pipelines before fe-core compilation. Align the file with the repository standard ASF header.

### Release note

None

### Check List (For Author)

- Test: Unit Test
    - Debug FE build: ./build.sh --fe -j48
    - FE UT: ./run-fe-ut.sh --run org.apache.doris.fs.FileSystemFactoryS3ExpressScopeTest
- Behavior changed: No
- Does this need documentation: No
@0AyanamiRei

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 80.27% (118/147) 🎉
Increment coverage report
Complete coverage report

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-H: Total hot run time: 29372 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 276bd1e997e253e3cfa747dfc566105aeb6def3f, data reload: false

------ Round 1 ----------------------------------
============================================
q1	17720	4084	4015	4015
q2	2019	335	211	211
q3	10282	1430	859	859
q4	4690	470	339	339
q5	7553	860	570	570
q6	177	165	136	136
q7	788	809	604	604
q8	9354	1523	1552	1523
q9	5977	4375	4355	4355
q10	6829	1742	1486	1486
q11	516	359	325	325
q12	710	579	470	470
q13	18051	3311	2727	2727
q14	286	266	248	248
q15	q16	796	771	705	705
q17	1042	1024	938	938
q18	7095	5693	5460	5460
q19	1293	1316	1131	1131
q20	798	700	567	567
q21	5978	2544	2412	2412
q22	440	359	291	291
Total cold run time: 102394 ms
Total hot run time: 29372 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4378	4350	4284	4284
q2	279	316	215	215
q3	4561	4950	4426	4426
q4	2065	2168	1355	1355
q5	4369	4268	4303	4268
q6	234	179	126	126
q7	1767	1939	1913	1913
q8	2564	2171	2192	2171
q9	7993	8078	7845	7845
q10	4717	4646	4252	4252
q11	566	414	369	369
q12	737	766	528	528
q13	3341	3610	2976	2976
q14	288	289	276	276
q15	q16	693	723	635	635
q17	1359	1336	1485	1336
q18	7756	7474	7227	7227
q19	1124	1100	1099	1099
q20	2197	2195	1931	1931
q21	5274	4532	4448	4448
q22	518	452	394	394
Total cold run time: 56780 ms
Total hot run time: 52074 ms

@0AyanamiRei

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-H: Total hot run time: 29891 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 94b1dc5a83c91534aedfaab4d9b1c368fb6e8520, data reload: false

------ Round 1 ----------------------------------
============================================
q1	17612	4072	4086	4072
q2	2008	327	199	199
q3	10312	1489	843	843
q4	4683	474	341	341
q5	7520	850	564	564
q6	183	175	138	138
q7	789	834	618	618
q8	9364	1603	1631	1603
q9	5655	4424	4386	4386
q10	6774	1735	1485	1485
q11	520	359	330	330
q12	728	595	473	473
q13	18067	3515	2797	2797
q14	272	265	241	241
q15	q16	776	775	713	713
q17	1001	1006	1058	1006
q18	6961	5765	5628	5628
q19	1317	1355	1122	1122
q20	787	682	553	553
q21	5949	2699	2475	2475
q22	437	365	304	304
Total cold run time: 101715 ms
Total hot run time: 29891 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4495	4435	4383	4383
q2	325	324	223	223
q3	4629	4982	4435	4435
q4	2067	2132	1392	1392
q5	4434	4266	4272	4266
q6	234	177	128	128
q7	1784	2151	1702	1702
q8	2585	2221	2220	2220
q9	7987	8082	7772	7772
q10	4673	4675	4259	4259
q11	572	431	394	394
q12	757	775	546	546
q13	3273	3591	2988	2988
q14	287	302	282	282
q15	q16	720	726	668	668
q17	1418	1352	1340	1340
q18	7994	7276	7290	7276
q19	1148	1135	1096	1096
q20	2211	2211	1940	1940
q21	5250	4556	4404	4404
q22	505	457	405	405
Total cold run time: 57348 ms
Total hot run time: 52119 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 177477 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 94b1dc5a83c91534aedfaab4d9b1c368fb6e8520, data reload: false

query5	4323	634	495	495
query6	474	225	202	202
query7	4973	605	346	346
query8	345	184	170	170
query9	8760	4154	4111	4111
query10	496	381	318	318
query11	5931	2351	2134	2134
query12	166	106	104	104
query13	1262	632	464	464
query14	6256	5262	4918	4918
query14_1	4278	4238	4248	4238
query15	220	207	180	180
query16	999	466	448	448
query17	950	737	602	602
query18	2439	482	349	349
query19	220	196	157	157
query20	109	108	116	108
query21	234	161	138	138
query22	13589	13578	13332	13332
query23	17447	16558	16110	16110
query23_1	16209	16235	16282	16235
query24	7514	1774	1287	1287
query24_1	1334	1314	1272	1272
query25	576	480	404	404
query26	1340	371	216	216
query27	2573	593	360	360
query28	4469	2031	2016	2016
query29	1083	632	518	518
query30	340	264	224	224
query31	1124	1092	981	981
query32	111	67	63	63
query33	528	326	268	268
query34	1159	1154	652	652
query35	775	775	695	695
query36	1175	1159	1075	1075
query37	158	115	98	98
query38	1893	1718	1665	1665
query39	877	880	887	880
query39_1	834	819	828	819
query40	242	160	149	149
query41	65	63	65	63
query42	97	93	91	91
query43	337	339	289	289
query44	1403	777	763	763
query45	207	192	175	175
query46	1109	1232	717	717
query47	2074	2078	1934	1934
query48	425	406	284	284
query49	574	412	312	312
query50	1096	433	344	344
query51	11048	10977	10739	10739
query52	86	88	82	82
query53	274	275	199	199
query54	287	231	217	217
query55	75	73	65	65
query56	286	294	295	294
query57	1333	1276	1194	1194
query58	286	260	254	254
query59	1605	1624	1429	1429
query60	323	279	254	254
query61	147	137	141	137
query62	539	492	431	431
query63	245	206	201	201
query64	2842	1062	846	846
query65	4722	4677	4628	4628
query66	1838	510	399	399
query67	29388	29299	28489	28489
query68	3070	1507	1043	1043
query69	414	303	271	271
query70	1090	949	951	949
query71	361	334	304	304
query72	3029	2712	2348	2348
query73	838	782	455	455
query74	5037	4906	4689	4689
query75	2540	2520	2141	2141
query76	2317	1201	791	791
query77	353	386	279	279
query78	11900	11858	11353	11353
query79	1453	1151	756	756
query80	1265	546	474	474
query81	544	339	290	290
query82	621	158	122	122
query83	373	330	312	312
query84	331	158	130	130
query85	976	607	529	529
query86	417	298	271	271
query87	1834	1833	1774	1774
query88	3774	2784	2782	2782
query89	439	395	334	334
query90	1925	202	197	197
query91	205	185	163	163
query92	62	60	56	56
query93	1698	1520	961	961
query94	718	344	314	314
query95	794	526	567	526
query96	1081	771	363	363
query97	2628	2636	2482	2482
query98	209	203	197	197
query99	1099	1109	976	976
Total cold run time: 264223 ms
Total hot run time: 177477 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
ClickBench: Total hot run time: 25.06 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 94b1dc5a83c91534aedfaab4d9b1c368fb6e8520, data reload: false

query1	0.00	0.00	0.00
query2	0.12	0.04	0.05
query3	0.25	0.14	0.14
query4	1.61	0.14	0.14
query5	0.23	0.22	0.21
query6	1.19	1.04	1.03
query7	0.04	0.01	0.01
query8	0.05	0.04	0.03
query9	0.40	0.33	0.32
query10	0.56	0.55	0.60
query11	0.19	0.14	0.14
query12	0.18	0.15	0.15
query13	0.48	0.47	0.47
query14	1.03	1.02	1.01
query15	0.62	0.59	0.59
query16	0.31	0.32	0.33
query17	1.10	1.13	1.11
query18	0.22	0.21	0.22
query19	2.09	1.98	2.00
query20	0.01	0.01	0.01
query21	15.43	0.21	0.13
query22	4.82	0.05	0.05
query23	16.13	0.30	0.13
query24	2.93	0.41	0.33
query25	0.11	0.05	0.04
query26	0.74	0.21	0.16
query27	0.05	0.04	0.04
query28	3.53	0.90	0.54
query29	12.55	4.17	3.31
query30	0.27	0.15	0.16
query31	2.77	0.59	0.32
query32	3.22	0.61	0.50
query33	3.22	3.09	3.28
query34	15.49	4.21	3.49
query35	3.54	3.51	3.54
query36	0.56	0.45	0.43
query37	0.08	0.07	0.07
query38	0.05	0.05	0.04
query39	0.03	0.04	0.03
query40	0.18	0.16	0.16
query41	0.08	0.03	0.03
query42	0.04	0.03	0.02
query43	0.04	0.04	0.03
Total cold run time: 96.54 s
Total hot run time: 25.06 s

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 73.42% (58/79) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 74.97% (30511/40700)
Line Coverage 59.12% (336455/569082)
Region Coverage 56.00% (283052/505478)
Branch Coverage 57.27% (125600/219331)

@0AyanamiRei

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-H: Total hot run time: 29541 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 94b1dc5a83c91534aedfaab4d9b1c368fb6e8520, data reload: false

------ Round 1 ----------------------------------
============================================
q1	17639	4037	4011	4011
q2	2048	320	200	200
q3	10264	1381	834	834
q4	4677	464	336	336
q5	7530	845	554	554
q6	179	165	134	134
q7	742	829	618	618
q8	9974	1585	1546	1546
q9	6139	4364	4332	4332
q10	6794	1712	1468	1468
q11	504	346	316	316
q12	755	565	448	448
q13	18142	3317	2772	2772
q14	264	254	240	240
q15	q16	790	782	705	705
q17	978	915	965	915
q18	7052	5729	5611	5611
q19	1418	1336	1112	1112
q20	800	700	602	602
q21	5834	2559	2495	2495
q22	426	355	292	292
Total cold run time: 102949 ms
Total hot run time: 29541 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4382	4311	4304	4304
q2	299	317	213	213
q3	4575	4939	4439	4439
q4	2066	2147	1357	1357
q5	4358	4247	4290	4247
q6	230	172	124	124
q7	1732	2087	1681	1681
q8	2494	2125	2106	2106
q9	7873	7812	7786	7786
q10	4638	4672	4182	4182
q11	578	413	372	372
q12	763	929	554	554
q13	3284	3515	2976	2976
q14	308	309	282	282
q15	q16	749	751	648	648
q17	1371	1329	1343	1329
q18	7990	7395	6860	6860
q19	1127	1113	1078	1078
q20	2187	2195	1945	1945
q21	5188	4485	4356	4356
q22	514	467	407	407
Total cold run time: 56706 ms
Total hot run time: 51246 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 177002 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 94b1dc5a83c91534aedfaab4d9b1c368fb6e8520, data reload: false

query5	4320	616	472	472
query6	466	216	229	216
query7	4860	611	342	342
query8	334	188	177	177
query9	8779	4053	4024	4024
query10	475	365	302	302
query11	5914	2315	2119	2119
query12	162	103	102	102
query13	1277	614	436	436
query14	6253	5163	4886	4886
query14_1	4230	4195	4225	4195
query15	210	204	177	177
query16	1015	465	459	459
query17	1125	713	571	571
query18	2443	482	349	349
query19	205	189	154	154
query20	113	107	110	107
query21	242	165	134	134
query22	13481	13444	13299	13299
query23	17276	16524	16236	16236
query23_1	16225	16253	16162	16162
query24	7679	1778	1292	1292
query24_1	1310	1272	1286	1272
query25	572	465	397	397
query26	1344	362	213	213
query27	2597	597	369	369
query28	4490	1941	1972	1941
query29	1125	626	498	498
query30	343	263	227	227
query31	1125	1107	986	986
query32	104	64	61	61
query33	526	324	258	258
query34	1183	1138	664	664
query35	767	774	656	656
query36	1191	1162	1027	1027
query37	164	111	98	98
query38	1833	1694	1677	1677
query39	903	877	845	845
query39_1	849	828	827	827
query40	269	205	136	136
query41	64	65	62	62
query42	93	92	90	90
query43	321	326	273	273
query44	1456	783	733	733
query45	204	177	174	174
query46	1070	1170	774	774
query47	2143	2128	2045	2045
query48	422	433	293	293
query49	590	401	309	309
query50	1068	437	329	329
query51	10805	11008	10889	10889
query52	86	93	76	76
query53	253	270	192	192
query54	289	229	213	213
query55	76	70	63	63
query56	310	300	290	290
query57	1330	1282	1185	1185
query58	282	253	273	253
query59	1612	1617	1413	1413
query60	312	269	252	252
query61	148	154	148	148
query62	558	497	441	441
query63	235	200	197	197
query64	2812	1037	878	878
query65	4728	4644	4594	4594
query66	1824	496	412	412
query67	29304	29165	28979	28979
query68	3107	1565	965	965
query69	401	295	266	266
query70	1038	965	956	956
query71	375	364	315	315
query72	3008	2643	2397	2397
query73	788	809	444	444
query74	5049	4864	4742	4742
query75	2543	2494	2109	2109
query76	2319	1171	778	778
query77	349	370	280	280
query78	11920	11856	11257	11257
query79	1433	1195	763	763
query80	1275	556	466	466
query81	528	326	288	288
query82	591	160	122	122
query83	361	317	297	297
query84	272	155	133	133
query85	951	615	512	512
query86	418	289	269	269
query87	1830	1813	1767	1767
query88	3758	2767	2756	2756
query89	439	376	323	323
query90	1894	196	189	189
query91	200	197	166	166
query92	62	57	58	57
query93	1713	1544	914	914
query94	720	343	324	324
query95	818	467	565	467
query96	1130	821	348	348
query97	2623	2631	2502	2502
query98	215	203	197	197
query99	1086	1114	963	963
Total cold run time: 263603 ms
Total hot run time: 177002 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
ClickBench: Total hot run time: 24.83 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 94b1dc5a83c91534aedfaab4d9b1c368fb6e8520, data reload: false

query1	0.01	0.01	0.00
query2	0.08	0.05	0.06
query3	0.26	0.13	0.13
query4	1.61	0.13	0.14
query5	0.26	0.22	0.21
query6	1.23	1.05	1.05
query7	0.04	0.00	0.00
query8	0.07	0.04	0.04
query9	0.39	0.31	0.30
query10	0.55	0.56	0.54
query11	0.19	0.13	0.14
query12	0.18	0.14	0.14
query13	0.47	0.47	0.48
query14	1.02	1.00	1.00
query15	0.61	0.58	0.59
query16	0.31	0.32	0.33
query17	1.10	1.08	1.12
query18	0.22	0.21	0.21
query19	2.02	1.93	1.97
query20	0.02	0.01	0.01
query21	15.43	0.21	0.12
query22	4.92	0.05	0.05
query23	16.11	0.29	0.11
query24	3.00	0.42	0.31
query25	0.11	0.04	0.03
query26	0.73	0.20	0.14
query27	0.03	0.03	0.04
query28	3.55	0.88	0.53
query29	12.49	4.10	3.27
query30	0.27	0.16	0.15
query31	2.77	0.57	0.31
query32	3.22	0.59	0.48
query33	3.12	3.18	3.21
query34	15.44	4.19	3.49
query35	3.54	3.57	3.52
query36	0.56	0.43	0.44
query37	0.09	0.07	0.06
query38	0.05	0.04	0.03
query39	0.04	0.03	0.03
query40	0.19	0.17	0.16
query41	0.08	0.04	0.03
query42	0.04	0.03	0.02
query43	0.04	0.04	0.03
Total cold run time: 96.46 s
Total hot run time: 24.83 s

@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 83.54% (66/79) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 57.51% (23998/41725)
Line Coverage 41.24% (236138/572611)
Region Coverage 37.03% (186487/503589)
Branch Coverage 38.27% (83893/219189)

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 73.42% (58/79) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 74.97% (30511/40700)
Line Coverage 59.12% (336469/569082)
Region Coverage 55.98% (282983/505478)
Branch Coverage 57.27% (125609/219331)

1 similar comment
@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 73.42% (58/79) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 74.97% (30511/40700)
Line Coverage 59.12% (336469/569082)
Region Coverage 55.98% (282983/505478)
Branch Coverage 57.27% (125609/219331)

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 73.42% (58/79) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 75.04% (30540/40700)
Line Coverage 59.20% (336878/569082)
Region Coverage 56.00% (283049/505478)
Branch Coverage 57.35% (125789/219331)

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 73.42% (58/79) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 75.04% (30540/40700)
Line Coverage 59.19% (336858/569082)
Region Coverage 55.97% (282896/505478)
Branch Coverage 57.35% (125782/219331)

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 73.42% (58/79) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 75.03% (30539/40700)
Line Coverage 59.20% (336876/569082)
Region Coverage 55.98% (282955/505478)
Branch Coverage 57.35% (125789/219331)

0AyanamiRei and others added 5 commits July 21, 2026 10:34
### What problem does this PR solve?

Issue Number: None

Related PR: apache#65504

Problem Summary: The S3 Express One Zone import change had unit coverage but no end-to-end regression suite for a real AWS directory bucket. Add an explicitly gated manual suite covering canonical Object URLs, s3:// URIs, S3 TVF, INSERT INTO SELECT, Broker Load, CSV, Parquet, ORC, multi-path and glob discovery, and ListObjectsV2 continuation over 1001 objects. Add a fixture preparation script that only uploads to a new prefix in an existing bucket and never creates or deletes storage.

### Release note

None

### Check List (For Author)

- Test: Manual test preparation
    - Groovy suite compiled with the regression framework Groovy compiler
    - bash -n and a stubbed fixture-script smoke test passed
    - Live AWS regression is pending and must generate the .out file with -genOut
- Behavior changed: No
- Does this need documentation: No
### What problem does this PR solve?

Issue Number: None

Related PR: apache#65504

Problem Summary: Directory bucket ListObjectsV2 responses are not lexicographically ordered and do not support key-based StartAfter pagination. Doris consumed these pages as though they had general-purpose bucket ordering, which could break deterministic glob results and streaming cursors. Broker Load also created a job before exercising the s3express:CreateSession path. Exhaust directory-bucket pages, sort raw keys globally in UTF-8 binary order, and apply cursors and limits on the client. Validate directory-list request constraints, perform a bounded Express read check before job submission, reuse one filesystem across pending paths, and consolidate duplicated bucket, provider, prefix, and client-selection logic.

### Release note

S3 Express directory-bucket imports now return deterministic file ordering and validate read access before Broker Load job creation.

### Check List (For Author)

- Test: Unit Test (coverage added and updated; execution intentionally skipped at the user request)
- Behavior changed: Yes (directory listings are globally ordered and Broker Load validates S3 Express read access before submission)
- Does this need documentation: No
### What problem does this PR solve?

Issue Number: None

Related PR: apache#63409

Problem Summary: Doris needs to import existing objects from S3 Express directory buckets without extending support to uploads. The previous implementation added a separate access preflight and globally sorted unordered directory-bucket listings, while client selection was not sufficiently isolated from non-read paths. This refactor confines SDK-managed S3 Express clients to file discovery and reader paths, preserves service list order with opaque continuation tokens, rejects key-based cursors and FE mutations, and keeps ordinary S3 and S3-compatible providers on standard clients.

### Release note

S3 TVF, INSERT SELECT, and Broker Load can import existing objects from AWS S3 Express One Zone directory buckets. Directory-bucket listings preserve service order; key-based incremental cursors, listing limits, and write operations are unsupported.

### Check List (For Author)

- Test: No need to test (per request; implementation received static FE/BE review)
- Behavior changed: Yes (S3 Express is restricted to import reads and directory-bucket list order is unspecified)
- Does this need documentation: Yes (follow-up documentation should cover URI forms, ReadOnly IAM SessionMode, and unordered listing semantics)
@0AyanamiRei 0AyanamiRei changed the title [feature](s3) Support S3 Express One Zone for S3 TVF and Broker Load [feature](s3) Support S3 Express One Zone Jul 23, 2026
### What problem does this PR solve?

Issue Number: None

Related PR: apache#65504

Problem Summary: The S3 Express import path accumulated redundant static and instance classification APIs and nested configuration wrappers. Consolidate provider gating, directory-bucket parsing, Object URL validation, Region derivation, and regional endpoint normalization into one internal path while preserving S3 TVF and Broker Load behavior.

### Release note

None

### Check List (For Author)

- Test: Unit Test
    - ./run-fe-ut.sh --run org.apache.doris.datasource.property.storage.S3PropertiesTest,org.apache.doris.nereids.trees.plans.commands.LoadCommandTest
    - ./run-fe-ut.sh --run org.apache.doris.datasource.property.storage.S3PropertiesTest
- Behavior changed: No
- Does this need documentation: No
@0AyanamiRei

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 82.22% (74/90) 🎉
Increment coverage report
Complete coverage report

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17816	4172	4100	4100
q2	2012	324	203	203
q3	10280	1469	837	837
q4	4688	466	336	336
q5	7493	871	568	568
q6	176	168	138	138
q7	780	821	618	618
q8	9404	1562	1600	1562
q9	5702	4454	4371	4371
q10	6738	1752	1485	1485
q11	507	369	344	344
q12	742	585	461	461
q13	18071	3440	2796	2796
q14	263	258	238	238
q15	q16	793	784	708	708
q17	1098	1043	1028	1028
q18	6905	5752	5529	5529
q19	1157	1267	1072	1072
q20	766	660	567	567
q21	5667	2654	2467	2467
q22	438	359	290	290
Total cold run time: 101496 ms
Total hot run time: 29718 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4413	4354	4366	4354
q2	291	315	216	216
q3	4619	4950	4379	4379
q4	2067	2157	1352	1352
q5	4464	4326	4354	4326
q6	233	180	131	131
q7	1749	2025	1871	1871
q8	2543	2256	2247	2247
q9	8182	8236	8004	8004
q10	4714	4674	4242	4242
q11	582	435	414	414
q12	766	782	535	535
q13	3329	3559	2997	2997
q14	299	309	270	270
q15	q16	715	724	652	652
q17	1375	1343	1488	1343
q18	8004	7419	7187	7187
q19	1166	1083	1077	1077
q20	2246	2203	1944	1944
q21	5273	4604	4465	4465
q22	506	454	431	431
Total cold run time: 57536 ms
Total hot run time: 52437 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 177879 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 dea82b9ff4b6eb818eea953bf8ad3169deb476d2, data reload: false

query5	4329	635	487	487
query6	462	219	211	211
query7	4843	578	347	347
query8	333	186	171	171
query9	8765	4097	4122	4097
query10	458	375	306	306
query11	5831	2375	2152	2152
query12	169	107	108	107
query13	1333	593	430	430
query14	6162	5203	4911	4911
query14_1	4238	4232	4236	4232
query15	216	212	182	182
query16	998	479	430	430
query17	958	737	591	591
query18	2450	473	350	350
query19	215	199	157	157
query20	112	107	109	107
query21	241	161	134	134
query22	13593	13624	13401	13401
query23	17461	16510	16176	16176
query23_1	16168	16256	16234	16234
query24	7478	1811	1300	1300
query24_1	1334	1286	1279	1279
query25	575	462	380	380
query26	1337	376	228	228
query27	2561	615	393	393
query28	4485	2006	2008	2006
query29	1101	636	497	497
query30	341	255	227	227
query31	1124	1108	978	978
query32	106	66	65	65
query33	543	328	263	263
query34	1186	1172	645	645
query35	759	785	669	669
query36	1185	1190	1030	1030
query37	159	118	101	101
query38	1901	1716	1664	1664
query39	880	890	840	840
query39_1	853	834	850	834
query40	257	170	141	141
query41	66	67	64	64
query42	92	90	94	90
query43	328	325	280	280
query44	1408	763	756	756
query45	206	190	173	173
query46	1061	1209	734	734
query47	2105	2144	1954	1954
query48	423	423	286	286
query49	587	423	302	302
query50	1089	437	327	327
query51	10491	10740	10609	10609
query52	89	93	76	76
query53	272	284	214	214
query54	284	232	209	209
query55	77	71	65	65
query56	295	296	298	296
query57	1323	1284	1204	1204
query58	296	262	274	262
query59	1565	1649	1537	1537
query60	318	283	249	249
query61	157	149	152	149
query62	548	486	432	432
query63	243	207	203	203
query64	2819	1027	858	858
query65	4694	4645	4623	4623
query66	1847	512	373	373
query67	29205	29154	29133	29133
query68	3086	1606	1050	1050
query69	407	309	270	270
query70	1052	984	941	941
query71	413	336	308	308
query72	3290	2931	2493	2493
query73	901	777	421	421
query74	5062	4899	4740	4740
query75	2546	2488	2122	2122
query76	2338	1192	776	776
query77	346	387	283	283
query78	11890	11944	11333	11333
query79	1398	1164	757	757
query80	1310	578	470	470
query81	521	333	293	293
query82	603	160	119	119
query83	383	329	298	298
query84	340	166	133	133
query85	974	607	542	542
query86	429	290	279	279
query87	1835	1827	1769	1769
query88	3708	2811	2771	2771
query89	440	386	323	323
query90	1964	194	198	194
query91	203	193	166	166
query92	61	57	54	54
query93	1677	1554	997	997
query94	712	363	325	325
query95	792	592	476	476
query96	1047	788	323	323
query97	2610	2645	2488	2488
query98	216	212	200	200
query99	1082	1104	971	971
Total cold run time: 263349 ms
Total hot run time: 177879 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
ClickBench: Total hot run time: 25.12 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit dea82b9ff4b6eb818eea953bf8ad3169deb476d2, data reload: false

query1	0.01	0.01	0.01
query2	0.09	0.08	0.05
query3	0.25	0.14	0.13
query4	1.61	0.14	0.12
query5	0.23	0.22	0.22
query6	1.25	1.04	1.06
query7	0.04	0.01	0.01
query8	0.06	0.04	0.04
query9	0.38	0.30	0.32
query10	0.55	0.55	0.55
query11	0.20	0.14	0.13
query12	0.18	0.14	0.14
query13	0.49	0.48	0.47
query14	1.04	1.02	1.01
query15	0.62	0.59	0.59
query16	0.32	0.33	0.32
query17	1.11	1.10	1.11
query18	0.23	0.22	0.21
query19	2.06	1.97	1.97
query20	0.02	0.01	0.01
query21	15.43	0.23	0.13
query22	4.84	0.05	0.06
query23	16.11	0.32	0.11
query24	3.06	0.43	0.32
query25	0.12	0.05	0.04
query26	0.74	0.20	0.15
query27	0.05	0.03	0.04
query28	3.48	0.90	0.54
query29	12.49	4.15	3.31
query30	0.27	0.15	0.16
query31	2.77	0.59	0.32
query32	3.22	0.59	0.49
query33	3.19	3.19	3.18
query34	15.61	4.25	3.56
query35	3.58	3.56	3.55
query36	0.55	0.42	0.43
query37	0.10	0.07	0.06
query38	0.05	0.04	0.03
query39	0.04	0.03	0.02
query40	0.18	0.17	0.16
query41	0.09	0.03	0.03
query42	0.03	0.02	0.02
query43	0.04	0.04	0.03
Total cold run time: 96.78 s
Total hot run time: 25.12 s

@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 51.67% (139/269) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 57.92% (24479/42260)
Line Coverage 41.91% (243606/581212)
Region Coverage 37.82% (193528/511691)
Branch Coverage 38.89% (87033/223795)

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 57.25% (154/269) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 75.15% (30975/41215)
Line Coverage 59.59% (344070/577433)
Region Coverage 56.40% (289644/513509)
Branch Coverage 57.65% (129072/223895)

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.

3 participants