[feature](cloud) Add Alibaba Cloud OSS C++ SDK stack - Part 3#65795
Draft
nsivarajan wants to merge 1 commit into
Draft
[feature](cloud) Add Alibaba Cloud OSS C++ SDK stack - Part 3#65795nsivarajan wants to merge 1 commit into
nsivarajan wants to merge 1 commit into
Conversation
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
nsivarajan
force-pushed
the
native-oss-sdk-pr3
branch
from
July 19, 2026 16:50
740bad5 to
828d638
Compare
Contributor
Author
|
run buildall |
Contributor
FE UT Coverage ReportIncrement line coverage |
nsivarajan
force-pushed
the
native-oss-sdk-pr3
branch
from
July 19, 2026 18:16
828d638 to
90f108c
Compare
Contributor
Author
|
run buildall |
Contributor
FE UT Coverage ReportIncrement line coverage |
nsivarajan
force-pushed
the
native-oss-sdk-pr3
branch
from
July 20, 2026 04:48
90f108c to
90bf179
Compare
Contributor
Author
|
run buildall |
Contributor
Author
|
run compile |
Contributor
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
nsivarajan
force-pushed
the
native-oss-sdk-pr3
branch
2 times, most recently
from
July 20, 2026 18:09
a4dfa8f to
6d2c81a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Issue Number: close #65793
Related PR: part 3 of 4 — PR-1 #61329 | PR-2 #65794 | PR-4 #xxx
Problem Summary:
Doris BE currently accesses OSS through the AWS S3-compatible SDK path. This works for basic AK/SK operations but cannot use ECS instance profile credentials, STS AssumeRole, RRSA, or environment variable providers — all of which require the native Alibaba Cloud OSS C++ SDK.
This PR implements the complete native OSS filesystem stack in BE, routed via a new
enable_oss_native_sdkconfig flag (defaultfalse). The existing S3-compatible path is fully preserved and used when the flag is off.Three routing paths all now emit
"provider"="OSS"to BE:OssFileSystemProperties.toBackendKv()ObjectStoreInfoPBOSSConf::get_oss_conf()OSSProperties.getBackendConfigProperties()Changes
New shared headers (
common/cpp/)oss_common.h—OSSCredProviderTypeenum,normalize_oss_endpoint()oss_credential_provider.h/cpp—ECSMetadataCredentialsProvider(metadata service, auto-refresh),OSSSTSCredentialProvider(STS AssumeRole, refresh 5 min before expiry),OSSDefaultCredentialsProvider(env → config → ECS chain)New BE filesystem (
be/src/io/fs/)oss_v2_obj_storage_client.h/cpp—OSSv2ObjStorageClient : ObjStorageClient; implements all object operations using native OSS SDKoss_file_system.h/cpp—OSSFileSystem : RemoteFileSystem; thread-safe client holder withshared_mutex; prefix normalised increate()factory before parent constructor; multipart copy for renames >1 GBoss_file_reader.h/cpp— range reads with exponential backoff + jitter on 429/SlowDown errorsoss_file_writer.h/cpp— multipart upload with async closeNew BE utility (
be/src/util/)oss_util.h/cpp—OSSClientConf,OSSConf,OSSClientFactorysingleton;get_oss_conf(ObjectStoreInfoPB)for storage vault path; SDK initialised once viastd::call_onceModified BE files (additive)
be/src/io/fs/file_system.h—FileSystemType::OSSadded to enumbe/src/util/s3_util.cpp—_create_oss_client()under#ifdef USE_OSS;convert_properties_to_s3_conf()detects"provider"="OSS"→ObjStorageType::OSS;S3ClientFactory::create()routes to native OSS client whenenable_oss_native_sdk=truebe/src/common/config.h/cpp—enable_oss_native_sdk=false,max_oss_client_retry,oss_read_base_wait_time_ms,oss_read_max_wait_time_msModified FE files (additive)
OSSProperties.java— addsroleArn,externalId;getBackendConfigProperties()emits"provider"="OSS",AWS_ROLE_ARN,AWS_EXTERNAL_IDOssFileSystemProperties.java—toBackendKv()adds"provider"="OSS"Tests
be/test/util/s3_util_test.cpp— 3 tests under#ifdef USE_OSS: provider detection, case-insensitive"oss", missing provider defaults to AWSfe-core/OSSPropertiesTest.java—testBackendConfigIncludesProviderOss(),testBackendConfigForwardsRoleArnAndExternalId()Design decisions
enable_oss_native_sdk=falseby default; all existing S3-compatible OSS behaviour is unchanged when offRemoteFileSystemparent reads the prefix in its constructor; normalisation must happen inOSSFileSystem::create()factory beforenew OSSFileSystem(...)is calledOssClientis thread-safe;shared_mutexinOSSClientHolderguards client pointer replacement only, not each callRelease note
[be] Add native Alibaba Cloud OSS filesystem (
OSSFileSystem,OSSFileReader,OSSFileWriter) using the official OSS C++ SDK. Activated byenable_oss_native_sdk=trueinbe.conf(defaultfalse). Supports ECS instance profile, STS AssumeRole, RRSA, env vars, and static AK/SK. Existing S3-compatible OSS path unchanged when flag is off.Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)