Skip to content

[feature](be) Native Azure credentials, SAS expiry and client lifetime in S3ClientFactory - #68117

Open
morningman wants to merge 4 commits into
apache:masterfrom
morningman:azure-split/be-1
Open

morningman wants to merge 4 commits into
apache:masterfrom
morningman:azure-split/be-1

Conversation

@morningman

@morningman morningman commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: #68103

Related PR: #67470

Original author: @xylaaaaa (all code in this PR is carved out of #67470; the commit carries Co-authored-by: xylaaaaa)

Problem Summary:

This is part 1 of the series tracked in #68103, which splits #67470 (route Azure data access
through native Azure credentials, original implementation by @xylaaaaa) into independently
reviewable PRs. Depends on nothing.

Today the BE knows only one way to talk to Azure Blob Storage: a SharedKey pair carried in the
AWS-shaped AWS_ACCESS_KEY / AWS_SECRET_KEY fields, with provider=azure as the only hint.
There is no way to pass a SAS token or an OAuth2 client credential, S3URI cannot parse
abfs[s]:// / wasb[s]:// locations, and a SAS token appended to a URL ends up in logs and
error messages. This PR is the BE consumer side of the native Azure protocol. The FE producer
side comes later in the series (FE-4), so nothing changes for existing deployments until a new
FE starts emitting the native fields.

What this PR does:

  • AzureCredentialOptions (new header common/cpp/obj-client/auth/azure_credential_options.h)
    is the provider-owned credential model: SHARED_KEY / SAS / OAUTH2, with validate()
    rejecting mixed credential groups. It has no Azure SDK dependency so S3ClientConf can carry
    it in builds with BUILD_AZURE=OFF.

  • S3ClientConf gains an azure_credentials member. operator==, get_hash() and
    to_string() are now provider-aware: for Azure the client identity is the Azure credential
    group plus endpoint / bucket / timeouts, and the AWS fields (region, role, signing settings)
    no longer participate. to_string() never prints a SAS token.

  • S3ClientFactory::convert_properties_to_s3_conf dispatches on provider=azure:

    • a map with AZURE_AUTH_TYPE is the native protocol (AZURE_ENDPOINT, AZURE_ACCOUNT_NAME,
      AZURE_ACCOUNT_KEY, AZURE_SAS_TOKEN, AZURE_SAS_EXPIRY_MS, AZURE_CLIENT_ID,
      AZURE_CLIENT_SECRET, AZURE_TENANT_ID, AZURE_OAUTH_SERVER_URI, AZURE_CONTAINER);
    • a map without it is the legacy SharedKey map (AWS_ENDPOINT / AWS_ACCESS_KEY /
      AWS_SECRET_KEY), handled by convert_legacy_azure_properties with unchanged behavior;
    • for native SharedKey the legacy AWS_* fields may also be present (rolling upgrade) and
      must agree with the AZURE_* fields.
    • validate_azure_uri checks that the data URI's container, account and host agree with the
      binding. OneLake hosts (*.fabric.microsoft.com) are refused by the native client and stay
      on their Hadoop binding.

    S3Conf::get_s3_conf(ObjectStoreInfoPB) / get_s3_conf(TS3StorageParam) (storage vault path)
    move ak/sk into azure_credentials for the Azure provider, so the vault path keeps working
    unchanged.

  • AzureAuthFactory::create builds the container client for all three credential types:
    SharedKey (StorageSharedKeyCredential), SAS (token appended to the container URL) and
    OAuth2 (Azure::Identity::ClientSecretCredential; the tenant comes from AZURE_TENANT_ID or
    is derived from the OAuth server URI). AzureAuthFactory::validate parses the SAS se=
    field and combines it with AZURE_SAS_EXPIRY_MS into the earliest effective expiry.

  • Azure clients live in a dedicated bounded cache (_azure_cache: capacity 256, the least
    recently accessed entry is evicted, expired SAS entries are pruned on every access). Expiry
    is re-checked on every create(), so an expired SAS is refused before a new reader or writer
    is opened. The existing _cache for non-Azure providers is untouched.
    S3ClientFactory::validate_credentials_for_access is the entry point the next PR (BE-2)
    uses at reader/writer open time. ObjClientHolder::reset now copies azure_credentials, so a
    storage-vault credential rotation replaces the Azure client instead of being ignored.

  • S3URI parses abfs[s]://[email protected]/key and
    wasb[s]://..., recognizes Azure HTTP(S) hosts (*.blob.core.windows.net,
    *.dfs.core.windows.net and the China / US Gov / Germany cloud suffixes), exposes
    get_endpoint() / get_account() / get_scheme() / is_azure(), and percent-decodes only
    HTTP(S) Azure paths (ABFS/WASB object names are literal, matching Iceberg ADLSLocation).
    Parse errors for Azure locations no longer echo the location.

  • SAS redaction: the Azure SDK logger listener and every AzureObjStorageClient error path
    strip the query component of URLs before the message is logged or returned.

  • AzureObjStorageClient::generate_presigned_url signs only with a SharedKey credential and
    returns an empty string for SAS/OAuth2; RuntimeState::get_error_log_file_path then keeps
    the local error log path instead of publishing an empty URL. The signed URL is now built from
    the SDK blob client URL, so a literal %2F in the object name signs the right blob.

  • AzureObjStorageClient::abort_multipart_upload becomes a no-op instead of deleting the blob.

Behavior / compatibility:

  • Old FE, new BE: AWS_ENDPOINT / AWS_ACCESS_KEY / AWS_SECRET_KEY + provider=azure keeps
    working through convert_legacy_azure_properties; Azure storage vault configs are unchanged.
  • An Azure host URI (abfs://..., https://x.blob.core.windows.net/...) without
    provider=azure is now rejected instead of being treated as S3.
  • abort_multipart_upload on Azure no longer deletes the target blob. Azure has no server-side
    multipart session; blocks are isolated per upload UUID, and deleting the blob could remove
    previously committed data or another writer's staged blocks.
  • Presigned URL generation is refused for SAS/OAuth2 credentials (a container-scoped SAS would
    otherwise be republished), and the error-log path falls back to the local file.
  • Native OAuth2: the BE builds the client with Azure::Identity::ClientSecretCredential from
    AZURE_CLIENT_ID / AZURE_CLIENT_SECRET / AZURE_TENANT_ID (or the tenant in
    AZURE_OAUTH_SERVER_URI). The description of [fix](iceberg) Route Azure data files through native credentials #67470 said native OAuth2 "fails closed"; this
    PR describes what the code does. User-delegation SAS signing for OAuth2 is not implemented, so
    presigned URLs are unavailable in that mode.

Rolling upgrade: a new FE emits both the native AZURE_* fields and the matching legacy AWS_*
group for SharedKey, so old BEs keep working; new BEs verify that the two groups agree. SAS and
OAuth2 have no legacy wire form: upgrade all BEs before enabling native SAS/OAuth2 from a new FE,
and stop native SAS/OAuth2 use before rolling back.

Review focus:

  1. S3ClientConf::operator== / get_hash() are now per-provider.
  2. _azure_cache (capacity 256, access-ordered eviction, expiry pruning) coexists with _cache.
  3. abort_multipart_upload semantic change (no-op instead of delete).
  4. generate_presigned_url signs only under SharedKey.
  5. convert_properties_to_s3_conf rejects Azure host URIs without provider=azure.
  6. OAuth2 wording versus code, see above.

Release note

None

Check List (For Author)

  • Test

    • Unit Test
      • macOS Debug BE UT, filter AzureAuthFactoryTest.*:AzureObjStorageClient*Test.*:AzureClientFactoryCacheTest.*:S3ClientFactoryTest.*:S3URITest.*:S3FileSystemTest.*: 121 tests, 84 passed, 37 skipped (34 S3FileSystemTest need a live bucket, 3 need Azurite), 0 failed
      • second pass *S3*:*Azure*:*Rowset* (guards every S3ClientConf designated-initializer site): 341 tests, 296 passed, 44 skipped, 1 failed. The failure (S3ObjStorageClientMockTest.test_ca_cert) and an exit-time abort from S3FileWriterTest are pre-existing macOS-only issues in files this PR does not touch (Linux CA bundle paths; a leaked static S3FileSystem destroyed after Aws::ShutdownAPI)
      • build-support/check-format.sh clean; the four common/cpp files clang-format 16 clean
    • Regression test
    • Manual test (add detailed scripts or steps below)
  • Behavior changed:

    • No.
    • Yes. Azure abort_multipart_upload no longer deletes the blob; presigned URLs are only generated for SharedKey; Azure host URIs require provider=azure.
  • 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

@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?

@morningman

Copy link
Copy Markdown
Contributor Author

run buildall

…e in S3ClientFactory

Part 1 of the apache#67470 split tracked in apache#68103: the BE consumer side of the
native Azure protocol.

- AzureCredentialOptions models SharedKey / SAS / OAuth2 credential groups
  and S3ClientConf carries it; equality, hash and to_string are per provider.
- S3ClientFactory accepts the native AZURE_* map and the legacy AWS_*
  SharedKey map (convert_legacy_azure_properties), validates the data URI
  against the binding, and keeps Azure clients in a separate bounded cache
  that is pruned by SAS expiry and re-validated on every access.
- AzureAuthFactory builds clients for all three credential types and
  derives the effective SAS expiry from the token and AZURE_SAS_EXPIRY_MS.
- S3URI parses abfs[s]:// and wasb[s]:// authorities and Azure HTTP(S)
  hosts; ABFS/WASB object names stay literal.
- SAS tokens are redacted from SDK logs and client error messages;
  generate_presigned_url signs only under SharedKey and the error-log path
  falls back to the local file when no URL can be signed;
  abort_multipart_upload no longer deletes the blob.

Issue: apache#68103
Related PR: apache#67470
Depends on: nothing

Co-authored-by: xylaaaaa <[email protected]>
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@morningman

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17660	4039	3891	3891
q2	2262	360	304	304
q3	9996	1398	817	817
q4	4682	487	349	349
q5	7575	835	538	538
q6	183	192	145	145
q7	744	769	608	608
q8	9339	1496	1713	1496
q9	5506	4215	4243	4215
q10	6719	1590	1364	1364
q11	439	268	245	245
q12	633	406	298	298
q13	18135	2657	1994	1994
q14	258	255	237	237
q15	q16	738	728	661	661
q17	1789	1161	1058	1058
q18	6590	5589	5535	5535
q19	1158	1283	1088	1088
q20	468	401	265	265
q21	5498	2594	2289	2289
q22	439	349	292	292
Total cold run time: 100811 ms
Total hot run time: 27689 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4239	4278	4186	4186
q2	751	560	547	547
q3	4498	4886	4352	4352
q4	2400	2262	1437	1437
q5	4286	4103	4090	4090
q6	233	176	133	133
q7	1699	1588	1387	1387
q8	2564	2151	2082	2082
q9	7516	7350	7512	7350
q10	4384	4282	3849	3849
q11	573	409	391	391
q12	708	735	509	509
q13	2480	2858	2193	2193
q14	289	298	277	277
q15	q16	697	737	632	632
q17	8065	7270	7180	7180
q18	11952	11218	11774	11218
q19	1233	1104	1111	1104
q20	2241	2222	1954	1954
q21	5927	4697	4497	4497
q22	505	458	394	394
Total cold run time: 67240 ms
Total hot run time: 59762 ms

@hello-stephen

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

query5	4338	585	462	462
query6	441	182	175	175
query7	4910	538	296	296
query8	315	169	159	159
query9	8769	3946	3985	3946
query10	446	308	250	250
query11	5894	2190	2040	2040
query12	154	94	96	94
query13	1235	605	387	387
query14	6509	4494	4194	4194
query14_1	3992	3990	3989	3989
query15	202	202	178	178
query16	1000	484	439	439
query17	903	689	550	550
query18	2433	462	344	344
query19	198	178	141	141
query20	104	101	100	100
query21	223	134	116	116
query22	13028	13122	12837	12837
query23	15646	14610	14093	14093
query23_1	14071	14014	14081	14014
query24	7714	1724	1236	1236
query24_1	1240	1220	1212	1212
query25	559	434	358	358
query26	1271	320	175	175
query27	2681	573	337	337
query28	4529	1997	1982	1982
query29	1042	604	460	460
query30	318	237	200	200
query31	901	748	630	630
query32	136	98	116	98
query33	540	334	248	248
query34	1174	1149	639	639
query35	721	747	666	666
query36	809	801	704	704
query37	160	103	93	93
query38	1845	1768	1731	1731
query39	710	698	659	659
query39_1	659	662	655	655
query40	228	122	108	108
query41	72	70	67	67
query42	95	90	90	90
query43	329	349	307	307
query44	1400	695	697	695
query45	190	181	176	176
query46	1088	1162	717	717
query47	1484	1508	1380	1380
query48	393	396	308	308
query49	588	416	292	292
query50	1043	346	256	256
query51	10629	10505	10541	10505
query52	90	89	78	78
query53	246	264	179	179
query54	258	264	193	193
query55	85	76	69	69
query56	224	205	200	200
query57	1466	1348	1377	1348
query58	228	207	202	202
query59	1971	2051	1817	1817
query60	287	228	219	219
query61	140	139	137	137
query62	400	317	265	265
query63	219	170	176	170
query64	2829	995	783	783
query65	4007	3961	3951	3951
query66	1817	420	299	299
query67	20083	20127	19941	19941
query68	3349	1607	834	834
query69	451	302	268	268
query70	940	878	845	845
query71	308	236	206	206
query72	2883	2483	2112	2112
query73	817	730	431	431
query74	4611	4493	4277	4277
query75	2285	2260	1951	1951
query76	2340	1110	703	703
query77	353	386	298	298
query78	8977	8982	8487	8487
query79	1370	1208	745	745
query80	1234	460	367	367
query81	531	278	244	244
query82	704	165	127	127
query83	355	273	245	245
query84	310	141	113	113
query85	863	456	383	383
query86	415	244	230	230
query87	1972	1974	1829	1829
query88	3709	2742	2737	2737
query89	359	277	236	236
query90	1883	177	164	164
query91	166	150	126	126
query92	103	89	90	89
query93	1565	1454	894	894
query94	719	293	298	293
query95	678	370	420	370
query96	1001	808	344	344
query97	2443	2436	2303	2303
query98	192	193	183	183
query99	748	712	605	605
Total cold run time: 242397 ms
Total hot run time: 153835 ms

@hello-stephen

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

query1	0.00	0.00	0.01
query2	0.10	0.05	0.05
query3	0.27	0.14	0.13
query4	1.62	0.14	0.14
query5	0.24	0.21	0.24
query6	1.16	0.92	0.92
query7	0.05	0.01	0.01
query8	0.06	0.04	0.04
query9	0.39	0.34	0.34
query10	0.59	0.55	0.60
query11	0.20	0.14	0.13
query12	0.19	0.15	0.15
query13	0.49	0.46	0.47
query14	0.96	0.95	0.95
query15	0.60	0.58	0.56
query16	0.30	0.31	0.31
query17	1.09	1.04	1.09
query18	0.21	0.19	0.20
query19	1.99	1.92	1.91
query20	0.02	0.02	0.01
query21	15.43	0.21	0.13
query22	4.84	0.04	0.05
query23	16.14	0.31	0.13
query24	2.98	0.41	0.34
query25	0.11	0.05	0.05
query26	0.73	0.20	0.15
query27	0.04	0.03	0.04
query28	3.54	0.74	0.34
query29	12.56	4.08	3.29
query30	0.28	0.16	0.15
query31	2.77	0.58	0.30
query32	3.23	0.59	0.49
query33	3.23	3.25	3.25
query34	15.49	3.90	3.27
query35	3.24	3.23	3.24
query36	0.56	0.43	0.42
query37	0.08	0.07	0.06
query38	0.05	0.04	0.04
query39	0.04	0.02	0.02
query40	0.19	0.16	0.15
query41	0.08	0.03	0.03
query42	0.03	0.03	0.03
query43	0.04	0.03	0.03
Total cold run time: 96.21 s
Total hot run time: 24.07 s

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100.00% (5/5) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 69.73% (31469/45129)
Line Coverage 54.52% (344534/631961)
Region Coverage 50.92% (287895/565385)
Branch Coverage 51.71% (131508/254297)

@morningman

Copy link
Copy Markdown
Contributor Author

/review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review summary

Requesting changes for two legacy Azure endpoint compatibility regressions. Existing SharedKey property, protobuf, and Thrift configurations can now be redirected when an endpoint is an unschemed single-label host, and schemed custom proxy base paths are newly rewritten by full URI normalization.

Review checkpoints

  • Goal and scope: The credential/auth/cache/URI foundation is otherwise coherent with the staged Azure migration, and all 21 changed files were reviewed.
  • Correctness and compatibility: The two inline findings are current old-FE/new-BE regressions. Adjacent scheme, port, IP, DFS/Blob, encoded-path, and standard custom-endpoint cases did not produce a distinct third issue.
  • Concurrency and lifecycle: Azure cache locking, expiry publication, eviction, and active shared ownership are sound. Holder reset ordering and unlocked configuration concerns exist in the merge base and are not introduced by this change.
  • Errors, security, and observability: Credential-group validation fails closed; examined SDK/status/log paths redact SAS queries; presign and abort callers preserve their documented failure and visibility semantics. No in-scope security vulnerability was substantiated under the repository threat model.
  • Tests and build boundaries: Focused coverage is broad, but legacy property/PB/Thrift fixtures are missing for the two endpoint regressions. BUILD_AZURE selection and header boundaries are statically consistent.
  • Persistence, configuration, and performance: No storage-format, EditLog, dynamic-variable, transaction, or material resource regression was found beyond the persisted endpoint compatibility changes called out inline.
  • User focus: No additional review focus was supplied.

Verification was static-only as required: no compilation, unit tests, or regression tests were run. The pure-text build-hygiene gate passed.

Comment thread be/src/util/s3_util.cpp
host.ends_with(".dfs.core.cloudapi.de"));
if (official_dfs) {
endpoint.replace(authority_begin + dfs_pos, 5, ".blob.");
} else if (!has_scheme && authority.find('.') == std::string::npos &&

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[P1] Preserve single-label hosts for legacy Azure endpoints

This shorthand rule also runs after convert_legacy_azure_properties() and both persisted storage-vault adapters. An existing legacy config with AWS_ENDPOINT=storage-proxy used to create https://storage-proxy/container; after this change it targets https://storage-proxy.blob.core.windows.net/container. The legacy endpoint contract does not require a scheme or dotted host, so internal proxies/emulators using one-label DNS names stop working on upgrade (and requests are redirected to an unrelated public origin). Please keep account-name suffix inference native-only, or otherwise distinguish legacy literal endpoints, and cover the property/PB/Thrift paths with an unschemed single-label endpoint.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 573f12c. Account-name suffix inference now only runs where the native protocol is parsed (convert_native_azure_properties); _create_azure_client() applies just the old factory's transport rule (default scheme + endpoint/container join boundary), so AWS_ENDPOINT=storage-proxy still targets https://storage-proxy/container. S3ClientFactoryTest.LegacyAzureEndpointsKeepSingleLabelHosts covers the property / ObjectStoreInfoPB / TS3StorageParam producers with unschemed single-label hosts (with and without port) and asserts the container base the SDK signs against.

Comment thread be/src/util/s3_util.cpp Outdated
void import_legacy_azure_shared_key(S3ClientConf* conf) {
// Keep the established SharedKey endpoint normalization at the legacy
// boundary. Native endpoints and object keys retain their internal slashes.
conf->endpoint = normalize_http_uri(conf->endpoint);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[P2] Keep legacy custom endpoint paths byte-preserving

Calling normalize_http_uri() here changes existing legacy endpoints, not just their credential representation. For example, current FE maps preserve https://proxy.example/gateway//tenant; the old factory passed https://proxy.example/gateway//tenant/container to the SDK, while this import rewrites it to /gateway/tenant/container. Repeated or trailing separators can be meaningful reverse-proxy routes, so those persisted endpoints silently target a different path after upgrade. Please normalize only the endpoint/container join boundary (or limit full normalization to the native protocol) and add property/PB/Thrift coverage for an exact custom base path.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 573f12c. import_legacy_azure_shared_key() no longer calls normalize_http_uri(); the persisted endpoint stays byte-for-byte and only the join boundary with the container is normalized, so https://proxy.example/gateway//tenant still becomes https://proxy.example/gateway//tenant/container. S3ClientFactoryTest.LegacyAzureEndpointsKeepCustomBasePathsBytePreserving covers all three producers with repeated separators, a trailing slash and an encoded base path.

Review follow-up for apache#68117. Legacy SharedKey producers (old FE property
maps, ObjectStoreInfoPB, TS3StorageParam) hand the endpoint over literally
and the old factory only defaulted the scheme. Two rewrites had leaked into
that path:

- normalize_azure_endpoint()'s bare account-name inference also ran for
  legacy endpoints, so an unschemed single-label host such as
  AWS_ENDPOINT=storage-proxy was redirected to
  https://storage-proxy.blob.core.windows.net.
- import_legacy_azure_shared_key() ran normalize_http_uri(), collapsing
  repeated path separators in custom reverse-proxy base paths.

The native protocol keeps its full normalization where it is parsed
(convert_native_azure_properties). _create_azure_client() now only applies
the transport rule the old factory had: default the scheme and normalize
the endpoint/container join boundary. The persisted endpoint is no longer
rewritten.

Tests cover all three legacy producers with unschemed single-label hosts
and exact custom base paths, asserting both the stored endpoint and the
container base the SDK signs against.

Issue: apache#68103
Related PR: apache#67470

Co-authored-by: xylaaaaa <[email protected]>
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@morningman

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 77.17% (2059/2668)
Line Coverage 65.53% (37898/57831)
Region Coverage 53.06% (35522/66947)
Branch Coverage 56.14% (11396/20300)

Follow-up for apache#68117. azure_transport_endpoint() was added in the
anonymous namespace without a guard, but its only caller is the
USE_AZURE branch of S3ClientFactory::_create_azure_client(). The
Performance pipeline builds with DISABLE_BUILD_AZURE=ON, so gcc
rejected the file with -Werror=unused-function:

  be/src/util/s3_util.cpp:333:13: error: 'std::string
  doris::{anonymous}::azure_transport_endpoint(std::string)' defined
  but not used [-Werror=unused-function]

Every other pipeline builds with Azure on, which is why only the
Performance job failed. Move the helper under the same USE_AZURE guard
as the other _create_azure_client()-only helpers. Verified locally with
-fsyntax-only for s3_util.cpp, s3_uri.cpp, s3_file_system.cpp and
runtime_state.cpp both with and without -DUSE_AZURE.

Issue: apache#68103
Related PR: apache#67470

Co-authored-by: xylaaaaa <[email protected]>
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@morningman

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17706	4181	4210	4181
q2	2291	343	301	301
q3	10016	1419	798	798
q4	4683	494	371	371
q5	7470	810	536	536
q6	182	177	141	141
q7	718	798	599	599
q8	9314	1553	1460	1460
q9	5444	4193	4195	4193
q10	6751	1637	1364	1364
q11	438	278	250	250
q12	631	425	306	306
q13	18044	2823	2094	2094
q14	267	262	242	242
q15	q16	751	730	668	668
q17	1772	1197	1020	1020
q18	6505	5597	5601	5597
q19	1148	1298	1078	1078
q20	481	388	268	268
q21	5695	2885	2574	2574
q22	452	384	318	318
Total cold run time: 100759 ms
Total hot run time: 28359 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4882	4898	4374	4374
q2	843	668	627	627
q3	4900	5406	4711	4711
q4	2558	2588	1711	1711
q5	4785	4635	4682	4635
q6	264	188	139	139
q7	2079	1911	1621	1621
q8	2642	2343	2194	2194
q9	7448	7082	6947	6947
q10	4390	4328	3878	3878
q11	570	418	380	380
q12	775	772	568	568
q13	2469	2779	2080	2080
q14	289	286	256	256
q15	q16	699	718	637	637
q17	7656	6774	6737	6737
q18	12058	11085	11911	11085
q19	1086	1018	974	974
q20	2269	2240	1951	1951
q21	5696	4833	4922	4833
q22	535	499	418	418
Total cold run time: 68893 ms
Total hot run time: 60756 ms

@hello-stephen

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

query5	4311	604	475	475
query6	441	203	175	175
query7	4809	547	294	294
query8	339	185	178	178
query9	8790	3990	4003	3990
query10	476	311	253	253
query11	5824	2201	2008	2008
query12	148	98	98	98
query13	1288	587	403	403
query14	6503	4586	4217	4217
query14_1	4004	4039	4008	4008
query15	209	201	181	181
query16	984	478	439	439
query17	917	678	535	535
query18	2419	475	337	337
query19	199	186	147	147
query20	108	101	105	101
query21	221	136	121	121
query22	13122	13088	12854	12854
query23	15422	14683	14036	14036
query23_1	13968	14041	14179	14041
query24	7543	1742	1229	1229
query24_1	1240	1215	1229	1215
query25	547	465	363	363
query26	1273	310	170	170
query27	2713	538	341	341
query28	4539	1971	1962	1962
query29	1059	612	479	479
query30	318	231	198	198
query31	878	764	644	644
query32	144	99	96	96
query33	524	332	246	246
query34	1172	1155	614	614
query35	743	790	676	676
query36	820	809	691	691
query37	156	110	94	94
query38	1847	1784	1687	1687
query39	728	677	644	644
query39_1	637	660	630	630
query40	229	124	102	102
query41	71	70	68	68
query42	93	91	92	91
query43	354	363	309	309
query44	1380	689	737	689
query45	184	177	168	168
query46	1069	1148	691	691
query47	1473	1502	1381	1381
query48	397	408	307	307
query49	589	413	291	291
query50	1025	342	251	251
query51	10319	10663	10545	10545
query52	85	87	73	73
query53	244	266	175	175
query54	242	199	195	195
query55	76	75	74	74
query56	221	218	228	218
query57	1520	1421	1366	1366
query58	238	218	205	205
query59	1986	2058	1809	1809
query60	278	241	222	222
query61	144	144	144	144
query62	393	320	267	267
query63	217	178	174	174
query64	2833	1017	815	815
query65	4033	3974	3969	3969
query66	1786	422	298	298
query67	19673	20120	19655	19655
query68	3362	1492	865	865
query69	407	295	267	267
query70	962	983	894	894
query71	374	245	233	233
query72	2930	2487	2246	2246
query73	871	860	434	434
query74	4683	4562	4381	4381
query75	2358	2326	1945	1945
query76	2322	1153	718	718
query77	378	414	296	296
query78	9234	9191	8635	8635
query79	1462	1207	732	732
query80	1236	463	384	384
query81	554	283	245	245
query82	641	168	123	123
query83	348	272	240	240
query84	307	139	115	115
query85	868	477	382	382
query86	410	235	234	234
query87	2001	1968	1843	1843
query88	3669	2737	2691	2691
query89	360	282	245	245
query90	1967	182	175	175
query91	165	157	125	125
query92	100	81	94	81
query93	1542	1507	840	840
query94	721	346	323	323
query95	656	379	409	379
query96	1064	758	305	305
query97	2427	2421	2307	2307
query98	195	190	182	182
query99	733	732	600	600
Total cold run time: 242074 ms
Total hot run time: 154071 ms

@hello-stephen

Copy link
Copy Markdown
Contributor

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 77.17% (2059/2668)
Line Coverage 65.58% (37926/57831)
Region Coverage 53.01% (35487/66947)
Branch Coverage 56.12% (11392/20300)

@hello-stephen

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

query1	0.01	0.01	0.00
query2	0.10	0.04	0.04
query3	0.27	0.14	0.14
query4	1.60	0.14	0.15
query5	0.26	0.23	0.22
query6	1.17	0.92	0.89
query7	0.04	0.01	0.01
query8	0.05	0.03	0.04
query9	0.40	0.35	0.34
query10	0.56	0.55	0.53
query11	0.21	0.14	0.14
query12	0.19	0.15	0.15
query13	0.48	0.49	0.48
query14	0.95	0.94	0.95
query15	0.62	0.59	0.58
query16	0.31	0.33	0.33
query17	1.14	1.11	1.08
query18	0.22	0.19	0.19
query19	2.00	1.94	1.88
query20	0.02	0.02	0.01
query21	15.43	0.22	0.13
query22	4.78	0.05	0.05
query23	16.16	0.31	0.13
query24	3.01	0.44	0.33
query25	0.11	0.06	0.06
query26	0.74	0.20	0.15
query27	0.04	0.03	0.03
query28	3.48	0.80	0.36
query29	12.54	4.07	3.19
query30	0.30	0.17	0.15
query31	2.78	0.57	0.31
query32	3.22	0.59	0.49
query33	3.23	3.23	3.25
query34	15.50	3.99	3.29
query35	3.26	3.22	3.23
query36	0.56	0.43	0.41
query37	0.10	0.06	0.06
query38	0.05	0.04	0.04
query39	0.03	0.02	0.03
query40	0.18	0.15	0.14
query41	0.09	0.03	0.03
query42	0.04	0.03	0.03
query43	0.04	0.04	0.04
Total cold run time: 96.27 s
Total hot run time: 24.01 s

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100.00% (5/5) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 76.25% (34416/45134)
Line Coverage 61.16% (386533/632010)
Region Coverage 57.53% (325303/565423)
Branch Coverage 58.29% (148256/254335)

@morningman

Copy link
Copy Markdown
Contributor Author

/review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Static review of exact head 3eb12a821b362b8f216ad6941b396e6587202e52 converged after three bounded rounds. I am requesting changes for three P2 correctness issues in the new native Azure URI contract: OneLake authorities with explicit ports bypass the Hadoop-only fence, ABFS/WASB paths lose literal ?/# object-name characters, and documented Azure -secondary endpoints are rejected. The two earlier legacy-endpoint discussions were treated as hard duplicate fences and their fixes are present at this head.

Critical checkpoint conclusions:

  • Goal and proof: the PR largely establishes the intended BE-1 native SharedKey/SAS/OAuth2 credential, URI, cache, SDK, redaction, presign, and multipart-lifecycle foundation while retaining legacy SharedKey inputs. The added unit coverage is broad, but the three missing negative/compatibility cases above mean the goal is not yet fully met.
  • Scope/minimality: the production changes are cohesive for BE-1. Provider-aware access-path parsing and per-open SAS validation are explicit BE-2 prerequisites, with native FE emission staged in FE-4; those dormant gaps were investigated and not duplicated as findings on this PR.
  • Concurrency: the factory mutex consistently protects cache, LRU, pruning, and publication state; SDK construction and rate-wrapper creation remain outside it; concurrent publication rechecks identity/expiry. No race, long critical section, lock-order, or deadlock defect was substantiated.
  • Lifecycle/static initialization: cache eviction preserves active clients through shared ownership, holder replacement is synchronized, the Azure cache is bounded, and no ownership cycle, leak, unsafe destruction dependency, or cross-TU initialization issue was found.
  • Configuration: no mutable Doris configuration item is added; the cache bound is internal, so dynamic-update behavior is not applicable.
  • Compatibility: legacy property/PB/Thrift SharedKey adapters, dual-field rolling-upgrade behavior, sovereign clouds, custom transports, and USE_AZURE-off guards were traced. The accepted OneLake and secondary-endpoint issues are the remaining compatibility failures.
  • Parallel paths: ABFS/WASB/HTTP(S), FileFactory, S3FileSystem, snapshot/result-writer/connectivity paths, all three auth modes, rate-limited delegation, presigning, and multipart operations were checked. No fourth distinct issue survived.
  • Conditional checks: credential groups generally fail closed and the endpoint/account checks are documented, but the OneLake and secondary-account conditions are incomplete as described inline.
  • Test coverage: URI, factory, legacy-adapter, cache, auth, real-SDK fake-transport, redaction, presign, and lifecycle tests were reviewed. Add deterministic cases for the three inline failures; no regression .out result applies to these C++ unit tests.
  • Executed results: this review was static-only as required; I did not build or run tests. The applicable exact-head CI checks visible at submission time are successful, which is CI evidence rather than independent execution.
  • Observability: existing statuses/logs retain useful endpoint/account context while redacting credential-bearing URLs; no additional metric or logging requirement was identified.
  • Persistence/transactions: no EditLog, replay, transaction-visibility, or storage-format contract changes. PB/Thrift edits preserve the legacy SharedKey representation.
  • Data writes/crash behavior: per-writer block IDs and completion ownership are coherent, and Azure abort being non-destructive avoids deleting committed data or another writer's blocks. No additional partial-write or crash-recovery defect was found.
  • FE/BE variables: no new Thrift/session variable is introduced here. The native property producer is intentionally staged in FE-4 behind the BE-1/BE-2 prerequisites.
  • Performance/memory/error handling: parsing is linear in short strings, cache scans are bounded to 256 entries, expensive construction stays outside the mutex, statuses/exceptions are propagated and redacted, and no nullable-column or tracked-allocation concern applies.
  • User focus: no additional focus point was supplied; the complete PR was reviewed.

Review status: complete and converged for this exact head; all candidates were submitted, dismissed with concrete staging/code evidence, or fenced as existing discussion.

Comment thread be/src/util/s3_uri.cpp
}
const auto dot = _endpoint.find('.');
_account = dot == std::string::npos ? _endpoint : _endpoint.substr(0, dot);
_key = authority_split.size() == 1 ? "/" : authority_split[1];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[P2] Keep ? and # literal in ABFS/WASB object paths

This new branch captures the complete ADLS suffix here, but the common parsing block below still truncates _key at ? and #. The pinned Iceberg ADLSLocation treats everything after the authority as the literal object path, and Azure client libraries escape reserved blob-name characters. Consequently, abfss://[email protected]/path/a?b#c.parquet is currently opened as path/a, which can fail or read a different blob. Skip query/fragment stripping for the ABFS/WASB schemes and add direct-parser plus FileFactory coverage for both characters.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 41567d7. S3URI::parse() no longer strips a query or fragment for the abfs/abfss/wasb/wasbs schemes: ADLSLocation (^(abfss?|wasbs?)://([^/?#]+)(.*)?$) and Hadoop's Path ("query & fragment not supported") both take everything after the authority as the object path, so abfss://[email protected]/path/a?b#c.parquet now yields the key path/a?b#c.parquet, with and without the provider flag. S3 and HTTP(S) locations keep stripping (an HTTP(S) Azure location may carry a SAS query, and %3F/%23 remain the encoded spelling there). S3URITest.QueryAndFragmentAreLiteralOnlyInAdlsPaths pins both sides and IcebergAdlsPathsPreserveLiteralPercentSequences gained ?/# object names for all four schemes.

FileFactory is not part of this PR; the reader/writer-open coverage for these names goes into BE-2 (#68103), the PR that changes file_factory.cpp and adds the provider-aware second parse there.

Comment thread be/src/util/s3_util.cpp
return Status::OK(); // Old SharedKey file-system paths use the S3 wire spelling.
}
const auto uri_host = to_lower(uri.get_endpoint());
if (uri_host.ends_with(".dfs.fabric.microsoft.com") ||

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[P2] Canonicalize the OneLake host before applying this fence

S3URI retains an explicit port in get_endpoint(), so abfss://[email protected]:443/file makes both suffix checks false. With a matching native endpoint (or a custom transport), the later authority checks accept it and route a genuine Fabric location through the native Azure client even though this branch requires OneLake to stay on its Hadoop binding; the HTTPS Blob spelling has the same issue. Extract the host without an optional port (and account for a DNS trailing dot) before the Fabric suffix check, and cover both ABFS and HTTPS OneLake authorities with :443.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 41567d7. The fence now matches on the DNS host rather than the raw authority: authority_host() lower-cases it and drops an explicit port and a trailing root dot before the Fabric suffix check, so abfss://[email protected]:443/..., the https://onelake.blob.fabric.microsoft.com:443/... spelling and ONELAKE.dfs.fabric.microsoft.com. all return NotSupported before any endpoint or account comparison runs. S3ClientFactoryTest.OneLakeFenceIgnoresPortAndDnsRootDot covers the ABFS and HTTPS forms with :443 against both a Fabric endpoint and a custom transport endpoint (the two paths that previously let it through).

Comment thread be/src/util/s3_util.cpp Outdated
if (http_uri && !endpoint.starts_with(uri.get_scheme() + "://")) {
return Status::InvalidArgument("Azure URI scheme conflicts with the storage endpoint");
}
if (S3URI::is_azure_endpoint(uri.get_endpoint()) &&

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[P2] Allow the documented Azure secondary account endpoint

For a native binding with AZURE_ACCOUNT_NAME=myaccount and AZURE_ENDPOINT=https://myaccount-secondary.blob.core.windows.net, this compares the URI label myaccount-secondary with the credential identity myaccount and rejects the request. Azure's RA-GRS/RA-GZRS secondary endpoint deliberately appends -secondary while using the same primary account identity and keys, so this prevents valid secondary reads. Canonicalize that documented suffix only for recognized Azure service authorities before this comparison, and add a secondary Blob-endpoint test.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 41567d7. On official Azure service hosts the -secondary account label is now folded to the primary account (azure_primary_authority()), and that folded identity is what the ABFS/WASB logical-account comparison against the configured endpoint and the credential account check both use. That matches how the SDK signs secondary reads: SharedKeyPolicy builds the canonicalized resource from m_credential->AccountName, and StorageSwitchToSecondaryPolicy only swaps the host, so the credential must keep the primary name. With AZURE_ENDPOINT=https://myaccount-secondary.blob.core.windows.net and AZURE_ACCOUNT_NAME=myaccount the factory now accepts abfss://[email protected]/..., the HTTPS secondary spelling, and abfss://[email protected]/... (table metadata written against the primary host, which is the usual RA-GRS read case and was rejected one check earlier by the same root cause).

HTTP(S) locations still have to match the configured transport origin exactly, and the fold is limited to recognized Azure authorities: other-secondary, an account literally named secondary, and myaccount-secondary-secondary stay rejected. Covered by AllowsDocumentedAzureSecondaryEndpoints and SecondaryFoldingKeepsOtherAccountsApart.

…idate_azure_uri

Review follow-up for apache#68117, three defects in the new native Azure URI
contract:

- S3URI::parse() stripped '?' and '#' from ABFS/WASB object paths. Iceberg's
  ADLSLocation ("^(abfss?|wasbs?)://([^/?#]+)(.*)?$") and Hadoop's Path both
  take everything after the authority as the object path, so an object
  named path/a?b#c.parquet was opened as path/a. Query and fragment are now
  only stripped for the S3 and HTTP(S) schemes.
- The OneLake fence compared the raw authority, so an explicit port
  (onelake.dfs.fabric.microsoft.com:443) or a trailing DNS root dot made a
  genuine Fabric location pass the later checks and reach the native client.
  The fence now matches on the DNS host (case-folded, no port, no root dot).
- Azure RA-GRS/RA-GZRS secondary endpoints append "-secondary" to the
  account label while keeping the primary account identity and keys (the SDK
  signs with the credential's account name and only swaps the host). The
  account check compared that label with the credential and rejected valid
  secondary reads. On official Azure hosts the suffix now folds to the
  primary account for the ABFS/WASB endpoint identity and for the credential
  account check; HTTP(S) transport matching stays exact.

Tests: S3URITest.QueryAndFragmentAreLiteralOnlyInAdlsPaths (plus '?'/'#'
names in IcebergAdlsPathsPreserveLiteralPercentSequences),
S3ClientFactoryTest.OneLakeFenceIgnoresPortAndDnsRootDot,
AllowsDocumentedAzureSecondaryEndpoints and
SecondaryFoldingKeepsOtherAccountsApart.

Issue: apache#68103
Related PR: apache#67470

Co-authored-by: xylaaaaa <[email protected]>
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@morningman

Copy link
Copy Markdown
Contributor Author

Addressed the three round-3 findings in 41567d7 (all three were introduced by this PR, so they are fixed here rather than deferred):

  • s3_uri.cpp: ? and # stay literal in ABFS/WASB object paths (ADLSLocation / Hadoop Path contract); S3 and HTTP(S) keep stripping.
  • s3_util.cpp: the OneLake fence checks the DNS host (no port, no trailing dot, case-folded).
  • s3_util.cpp: -secondary on official Azure hosts folds to the primary account for both the endpoint identity and the credential account check; HTTP(S) transport matching stays exact.

Unit coverage: S3URITest.QueryAndFragmentAreLiteralOnlyInAdlsPaths, S3ClientFactoryTest.OneLakeFenceIgnoresPortAndDnsRootDot, AllowsDocumentedAzureSecondaryEndpoints, SecondaryFoldingKeepsOtherAccountsApart; S3URITest.* and S3ClientFactoryTest.* pass locally. FileFactory coverage for the literal ?/# names lands with BE-2, which owns file_factory.cpp.

@morningman

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 77.17% (2059/2668)
Line Coverage 65.60% (37941/57833)
Region Coverage 53.05% (35518/66950)
Branch Coverage 56.18% (11406/20302)

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17740	3937	3875	3875
q2	2279	342	295	295
q3	10029	1414	834	834
q4	4683	475	346	346
q5	7478	817	548	548
q6	180	170	133	133
q7	719	800	595	595
q8	9311	1598	1566	1566
q9	5472	4198	4171	4171
q10	6621	1620	1342	1342
q11	421	276	259	259
q12	634	407	288	288
q13	18057	2604	2113	2113
q14	260	255	233	233
q15	q16	737	715	670	670
q17	1788	1244	1017	1017
q18	6564	5635	5572	5572
q19	1313	1315	1046	1046
q20	469	388	267	267
q21	5801	2437	2334	2334
q22	425	351	301	301
Total cold run time: 100981 ms
Total hot run time: 27805 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4152	4067	4065	4065
q2	747	593	547	547
q3	4517	4942	4423	4423
q4	2225	2298	1437	1437
q5	4281	4104	4060	4060
q6	224	171	125	125
q7	1643	1586	1409	1409
q8	2147	2505	2156	2156
q9	7544	7604	7632	7604
q10	4335	4283	3862	3862
q11	569	416	389	389
q12	769	720	522	522
q13	2508	2882	2199	2199
q14	282	292	281	281
q15	q16	724	711	659	659
q17	7715	7141	7185	7141
q18	11983	11096	11841	11096
q19	1175	1046	1080	1046
q20	2277	2224	1946	1946
q21	5776	4706	4856	4706
q22	538	491	440	440
Total cold run time: 66131 ms
Total hot run time: 60113 ms

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100.00% (4/4) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 76.22% (34373/45098)
Line Coverage 61.14% (386064/631427)
Region Coverage 57.50% (324734/564763)
Branch Coverage 58.30% (148093/254001)

@hello-stephen

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

query5	4345	601	448	448
query6	439	186	179	179
query7	4866	563	301	301
query8	322	179	158	158
query9	8798	3995	3985	3985
query10	450	309	257	257
query11	5741	2157	1993	1993
query12	153	98	98	98
query13	1238	565	431	431
query14	6520	4533	4321	4321
query14_1	4034	3972	3947	3947
query15	208	207	180	180
query16	1029	466	420	420
query17	911	671	537	537
query18	2430	458	342	342
query19	198	178	142	142
query20	106	100	109	100
query21	219	133	117	117
query22	13061	13013	12744	12744
query23	15403	14499	14016	14016
query23_1	14198	14106	14124	14106
query24	7606	1715	1214	1214
query24_1	1226	1231	1235	1231
query25	539	429	369	369
query26	1246	310	170	170
query27	2719	516	347	347
query28	4615	1961	1943	1943
query29	1076	606	479	479
query30	327	243	201	201
query31	901	768	647	647
query32	155	98	99	98
query33	507	320	251	251
query34	1221	1121	624	624
query35	717	777	661	661
query36	802	820	720	720
query37	157	106	94	94
query38	1836	1766	1722	1722
query39	695	690	663	663
query39_1	642	660	673	660
query40	217	125	103	103
query41	74	73	71	71
query42	95	94	93	93
query43	341	346	296	296
query44	1345	687	698	687
query45	192	180	173	173
query46	1029	1147	681	681
query47	1493	1496	1382	1382
query48	392	391	288	288
query49	606	434	347	347
query50	988	339	241	241
query51	10565	10134	10299	10134
query52	85	82	81	81
query53	248	248	177	177
query54	249	200	179	179
query55	76	73	76	73
query56	214	221	217	217
query57	1609	1238	1299	1238
query58	241	201	206	201
query59	1959	2046	1791	1791
query60	285	243	217	217
query61	141	143	151	143
query62	396	315	259	259
query63	211	175	176	175
query64	2902	1038	810	810
query65	4019	4000	3988	3988
query66	1816	423	299	299
query67	19878	19919	19967	19919
query68	3176	1560	881	881
query69	434	302	261	261
query70	927	892	880	880
query71	297	243	216	216
query72	2997	2276	2158	2158
query73	832	747	425	425
query74	4650	4447	4296	4296
query75	2301	2253	1918	1918
query76	2340	1094	717	717
query77	359	392	298	298
query78	9297	9139	8542	8542
query79	1324	1261	735	735
query80	751	451	360	360
query81	487	280	240	240
query82	635	167	126	126
query83	325	266	240	240
query84	311	140	110	110
query85	1019	461	374	374
query86	391	249	236	236
query87	2008	1968	1844	1844
query88	3625	2696	2686	2686
query89	358	288	245	245
query90	1723	187	167	167
query91	170	153	126	126
query92	101	89	88	88
query93	1542	1363	860	860
query94	608	334	295	295
query95	669	463	329	329
query96	1120	785	342	342
query97	2463	2441	2314	2314
query98	205	192	181	181
query99	731	726	603	603
Total cold run time: 241675 ms
Total hot run time: 153131 ms

@hello-stephen

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

query1	0.01	0.00	0.01
query2	0.10	0.05	0.04
query3	0.26	0.14	0.14
query4	1.61	0.14	0.14
query5	0.25	0.23	0.23
query6	1.17	0.93	0.92
query7	0.04	0.01	0.01
query8	0.06	0.04	0.03
query9	0.41	0.34	0.35
query10	0.61	0.58	0.55
query11	0.21	0.14	0.15
query12	0.19	0.15	0.15
query13	0.47	0.47	0.46
query14	0.95	0.95	0.96
query15	0.63	0.59	0.58
query16	0.33	0.32	0.33
query17	1.10	1.08	1.06
query18	0.22	0.22	0.20
query19	1.99	1.97	1.97
query20	0.02	0.02	0.01
query21	15.45	0.18	0.15
query22	4.99	0.06	0.05
query23	16.20	0.30	0.11
query24	2.97	0.38	0.34
query25	0.11	0.06	0.04
query26	0.72	0.21	0.14
query27	0.05	0.04	0.03
query28	3.54	0.77	0.35
query29	12.46	3.99	3.20
query30	0.29	0.15	0.15
query31	2.77	0.55	0.31
query32	3.22	0.59	0.49
query33	3.22	3.25	3.27
query34	15.75	3.99	3.30
query35	3.21	3.23	3.22
query36	0.56	0.42	0.43
query37	0.09	0.07	0.06
query38	0.05	0.05	0.04
query39	0.04	0.02	0.02
query40	0.17	0.15	0.14
query41	0.09	0.04	0.03
query42	0.04	0.03	0.03
query43	0.04	0.04	0.03
Total cold run time: 96.66 s
Total hot run time: 24.14 s

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.

2 participants